|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.operator.AbstractIOObject
com.rapidminer.operator.ResultObjectAdapter
com.rapidminer.example.set.AbstractExampleSet
com.rapidminer.example.set.AttributeWeightedExampleSet
public class AttributeWeightedExampleSet
An implementation of ExampleSet that allows the weighting of the attributes.
Weights can be queried by the method getWeight(Attribute).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.rapidminer.operator.AbstractIOObject |
|---|
AbstractIOObject.InputStreamProvider |
| Constructor Summary | |
|---|---|
|
AttributeWeightedExampleSet(AttributeWeightedExampleSet exampleSet)
Clone constructor. |
protected |
AttributeWeightedExampleSet(ExampleSet exampleSet)
Constructs a new AttributeWeightedExampleSet. |
|
AttributeWeightedExampleSet(ExampleSet exampleSet,
AttributeWeights weights)
Constructs a new AttributeWeightedExampleSet. |
|
AttributeWeightedExampleSet(ExampleSet exampleSet,
AttributeWeights weights,
double defaultWeight)
Constructs a new AttributeWeightedExampleSet. |
| Method Summary | |
|---|---|
AttributeWeightedExampleSet |
createCleanClone()
Returns a clone where the zero weighted attributes are not delivered. |
DataTable |
createDataTable(IOContainer container)
This method is used to create a DataTable from this example set. |
void |
deselectAll()
Sets the weights of all attributes to 0.0. |
boolean |
equals(java.lang.Object o)
Returns true, if all attributes including labels and other special attributes are equal. |
void |
flipAttributeUsed(Attribute attribute)
Flips the selection state of the attribute with the given index. |
Attributes |
getAttributes()
Returns the data structure holding all attributes. |
AttributeWeights |
getAttributeWeights()
|
Example |
getExample(int index)
Returns the i-th example. |
ExampleTable |
getExampleTable()
Returns the underlying example table. |
int |
getNumberOfUsedAttributes()
Returns the number of selected attributes. |
double |
getWeight(Attribute attribute)
Returns the weight of the attribute. |
int |
hashCode()
Returns the hash code of all attributes. |
boolean |
isAttributeUsed(Attribute attribute)
Returns the selection state of the attribute. |
java.util.Iterator<Example> |
iterator()
Creates a new example set reader. |
void |
selectAll()
Sets the weights of all attributes to 1.0. |
void |
selectRandomSubset(int n,
java.util.Random random)
Randomly selects approximately the given number of attributes. |
void |
setAttributeUsed(Attribute attribute,
boolean selected)
Sets the selection state of the attribute. |
void |
setWeight(Attribute attribute,
double weightValue)
Sets the weight of the attribute. |
int |
size()
Returns the number of examples in this example set. |
java.lang.String |
toString()
|
| Methods inherited from class com.rapidminer.example.set.AbstractExampleSet |
|---|
clone, copy, getExampleFromId, getExampleIndicesFromId, getExtension, getFileDescription, getName, getStatistics, getStatistics, recalculateAllAttributeStatistics, recalculateAttributeStatistics, remapIds, writeAttributeFile, writeDataFile, writeSparseAttributeFile, writeSparseDataFile |
| Methods inherited from class com.rapidminer.operator.ResultObjectAdapter |
|---|
addAction, getActions, getAnnotations, getResultIcon, log, log, logError, logNote, logWarning, toHTML, toResultString |
| Methods inherited from class com.rapidminer.operator.AbstractIOObject |
|---|
appendOperatorToHistory, getLog, getProcessingHistory, getSource, initWriting, read, read, read, read, setLoggingHandler, setSource, write |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.rapidminer.operator.ResultObject |
|---|
getActions, getResultIcon, toResultString |
| Methods inherited from interface com.rapidminer.operator.IOObject |
|---|
appendOperatorToHistory, getAnnotations, getLog, getProcessingHistory, getSource, setLoggingHandler, setSource, write |
| Constructor Detail |
|---|
protected AttributeWeightedExampleSet(ExampleSet exampleSet)
public AttributeWeightedExampleSet(ExampleSet exampleSet,
AttributeWeights weights)
public AttributeWeightedExampleSet(ExampleSet exampleSet,
AttributeWeights weights,
double defaultWeight)
public AttributeWeightedExampleSet(AttributeWeightedExampleSet exampleSet)
| Method Detail |
|---|
public AttributeWeights getAttributeWeights()
public AttributeWeightedExampleSet createCleanClone()
public Attributes getAttributes()
ExampleSet
public double getWeight(Attribute attribute)
public void setWeight(Attribute attribute,
double weightValue)
public int getNumberOfUsedAttributes()
public void selectAll()
public void deselectAll()
public boolean isAttributeUsed(Attribute attribute)
public void setAttributeUsed(Attribute attribute,
boolean selected)
public void flipAttributeUsed(Attribute attribute)
public void selectRandomSubset(int n,
java.util.Random random)
public boolean equals(java.lang.Object o)
AbstractExampleSet
equals in interface ExampleSetequals in class AbstractExampleSetpublic int hashCode()
AbstractExampleSet
hashCode in interface ExampleSethashCode in class AbstractExampleSetpublic java.lang.String toString()
toString in class AbstractExampleSetpublic DataTable createDataTable(IOContainer container)
AbstractExampleSetDataTable from this example set. The default implementation
returns an instance of DataTableExampleSetAdapter. The given IOContainer is used to check if
there are compatible attribute weights which would used as column weights of the returned table.
Subclasses might want to override this method in order to allow for other data tables.
createDataTable in class AbstractExampleSetpublic java.util.Iterator<Example> iterator()
public Example getExample(int index)
ExampleSetExampleReader should be used.
public ExampleTable getExampleTable()
ExampleSet
public int size()
ExampleSet
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||