com.rapidminer.operator.preprocessing.discretization
Class DiscretizationModel
java.lang.Object
com.rapidminer.operator.AbstractIOObject
com.rapidminer.operator.ResultObjectAdapter
com.rapidminer.operator.AbstractModel
com.rapidminer.operator.preprocessing.PreprocessingModel
com.rapidminer.operator.preprocessing.discretization.DiscretizationModel
- All Implemented Interfaces:
- IOObject, Model, ResultObject, ViewModel, Readable, Reportable, LoggingHandler, java.io.Serializable
public class DiscretizationModel
- extends PreprocessingModel
The generic discretization model.
- Author:
- Sebastian Land
- See Also:
- Serialized Form
|
Method Summary |
ExampleSet |
applyOnData(ExampleSet exampleSet)
Applies the model by changing the underlying data |
java.util.Map<java.lang.String,java.util.SortedSet<Tupel<java.lang.Double,java.lang.String>>> |
getRanges()
|
Attributes |
getTargetAttributes(ExampleSet parentSet)
This method has to return a legal Attributes object containing
every Attribute, the view should contain |
double |
getValue(Attribute targetAttribute,
double value)
This method has to provide the attribute value mapping for the view. |
void |
setRanges(java.util.Map<Attribute,double[]> rangesMap,
java.lang.String rangeName,
int rangeNameType,
int numberOfDigits)
Creates the ranges. |
void |
setRanges(java.util.Map<java.lang.String,java.util.SortedSet<Tupel<java.lang.Double,java.lang.String>>> rangesMap)
|
java.lang.String |
toString()
|
| Methods inherited from class com.rapidminer.operator.AbstractIOObject |
appendOperatorToHistory, copy, getLog, getProcessingHistory, getSource, initWriting, read, read, read, read, setLoggingHandler, setSource, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RANGE_NAME_TYPES
public static final java.lang.String[] RANGE_NAME_TYPES
RANGE_NAME_LONG
public static final int RANGE_NAME_LONG
- See Also:
- Constant Field Values
RANGE_NAME_SHORT
public static final int RANGE_NAME_SHORT
- See Also:
- Constant Field Values
RANGE_NAME_INTERVAL
public static final int RANGE_NAME_INTERVAL
- See Also:
- Constant Field Values
DiscretizationModel
public DiscretizationModel(ExampleSet exampleSet)
DiscretizationModel
public DiscretizationModel(ExampleSet exampleSet,
boolean removeUseless)
applyOnData
public ExampleSet applyOnData(ExampleSet exampleSet)
throws OperatorException
- Description copied from class:
PreprocessingModel
- Applies the model by changing the underlying data
- Specified by:
applyOnData in class PreprocessingModel
- Throws:
OperatorException
setRanges
public void setRanges(java.util.Map<Attribute,double[]> rangesMap,
java.lang.String rangeName,
int rangeNameType,
int numberOfDigits)
throws UserError
- Creates the ranges. If the range name type is 'Interval' and the number of digits is smaller than 0, the number
of digits is automatically determined in a way such that the range names do actually differ but are rounded as
far as possible.
- Throws:
UserError
setRanges
public void setRanges(java.util.Map<java.lang.String,java.util.SortedSet<Tupel<java.lang.Double,java.lang.String>>> rangesMap)
getRanges
public java.util.Map<java.lang.String,java.util.SortedSet<Tupel<java.lang.Double,java.lang.String>>> getRanges()
toString
public java.lang.String toString()
- Specified by:
toString in interface Readable- Overrides:
toString in class java.lang.Object
getTargetAttributes
public Attributes getTargetAttributes(ExampleSet parentSet)
- Description copied from interface:
ViewModel
- This method has to return a legal Attributes object containing
every Attribute, the view should contain
- Returns:
- The attribute object
getValue
public double getValue(Attribute targetAttribute,
double value)
- Description copied from interface:
ViewModel
- This method has to provide the attribute value mapping for the view.
The views attributes will ask this method for their value.
- Parameters:
targetAttribute - the attribute, which asks for his valuevalue - the value the source attribute had in original data
- Returns:
- the value the attribute should have in target view
Copyright © 2001-2009 by Rapid-I