|
||||||||||
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.MappedExampleSet
public class MappedExampleSet
This example set uses a mapping of indices to access the examples provided by the parent example set. The mapping does not need to contain unique indices which is especially useful for sampling with replacement. For performance reasons (iterations, database access...) the mapping will be sorted during the construction of this example set (based on the parameter sort).
Please note that the constructor takes a boolean flag indicating if the examples from the given array are used or if the examples which are not part of this mapping should be used. This might be useful in the context of bootstrapped validation for example.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.rapidminer.operator.AbstractIOObject |
---|
AbstractIOObject.InputStreamProvider |
Constructor Summary | |
---|---|
MappedExampleSet(ExampleSet parent,
int[] mapping)
Constructs an example set based on the given mapping. |
|
MappedExampleSet(ExampleSet parent,
int[] mapping,
boolean useMappedExamples)
Constructs an example set based on the given mapping. |
|
MappedExampleSet(ExampleSet parent,
int[] mapping,
boolean useMappedExamples,
boolean sort)
Constructs an example set based on the given mapping. |
|
MappedExampleSet(MappedExampleSet exampleSet)
Clone constructor. |
Method Summary | |
---|---|
static int[] |
createBootstrappingMapping(ExampleSet exampleSet,
int size,
java.util.Random random)
Creates a new mapping for the given example set by sampling with replacement. |
static int[] |
createWeightedBootstrappingMapping(ExampleSet exampleSet,
int size,
java.util.Random random)
|
boolean |
equals(java.lang.Object o)
Returns true, if all attributes including labels and other special attributes are equal. |
Attributes |
getAttributes()
Returns the data structure holding all attributes. |
Example |
getExample(int index)
Returns the i-th example in the mapping. |
ExampleTable |
getExampleTable()
Returns the underlying example table. |
int |
hashCode()
Returns the hash code of all attributes. |
java.util.Iterator<Example> |
iterator()
Returns a MappedExampleReader . |
int |
size()
Counts the number of examples. |
Methods inherited from class com.rapidminer.example.set.AbstractExampleSet |
---|
clone, copy, createDataTable, getExampleFromId, getExampleIndicesFromId, getExtension, getFileDescription, getName, getStatistics, getStatistics, recalculateAllAttributeStatistics, recalculateAttributeStatistics, remapIds, toString, 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 |
---|
public MappedExampleSet(ExampleSet parent, int[] mapping)
public MappedExampleSet(ExampleSet parent, int[] mapping, boolean useMappedExamples)
public MappedExampleSet(ExampleSet parent, int[] mapping, boolean useMappedExamples, boolean sort)
public MappedExampleSet(MappedExampleSet exampleSet)
Method Detail |
---|
public boolean equals(java.lang.Object o)
AbstractExampleSet
equals
in interface ExampleSet
equals
in class AbstractExampleSet
public int hashCode()
AbstractExampleSet
hashCode
in interface ExampleSet
hashCode
in class AbstractExampleSet
public java.util.Iterator<Example> iterator()
MappedExampleReader
.
public Example getExample(int index)
public int size()
public Attributes getAttributes()
ExampleSet
ExampleSet#getAttributes()#getAttributes()
and use it instead.
public ExampleTable getExampleTable()
ExampleSet
public static int[] createBootstrappingMapping(ExampleSet exampleSet, int size, java.util.Random random)
public static int[] createWeightedBootstrappingMapping(ExampleSet exampleSet, int size, java.util.Random random)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |