|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.operator.Operator
com.rapidminer.operator.AbstractExampleSetProcessing
com.rapidminer.operator.preprocessing.AbstractDataProcessing
com.rapidminer.operator.preprocessing.filter.AttributeValueMapper
public class AttributeValueMapper
This operator takes an ExampleSet as input and maps the
values of certain attributes to other values. The operator can replace
nominal values (e.g. replace the value "green" by the value
"green_color") as well as numerical values (e.g. replace the
all values "3" by "-1"). A single mapping can be
specified using the parameters replace_what and
replace_by. Multiple mappings can be specified in the parameter
list value_mappings.
Additionally, the operator allows to define (and consider) a default
mapping. If add_default_mapping is set to true and default_value
is properly set, all values that occur in the example set but are not listed
in the value mappings list are replaced by the default value. This may be
helpful in cases where only some values should be mapped explicitly and
many unimportant values should be mapped to a default value (e.g. "other").
If the parameter consider_regular_expressions is enabled, the
values are replaced by the new values if the original values match the given
regular expressions. The value corresponding to the first matching regular
expression in the mappings list is taken as replacement.
This operator supports regular expressions for the attribute names, i.e. the value mapping is applied on all attributes for which the name fulfills the pattern defined by the name expression.
| Field Summary | |
|---|---|
static java.lang.String |
PARAMETER_ADD_DEFAULT_MAPPING
The parameter name for "If set to true, all original values which are not listed in the value mappings list are mapped to the default value. |
static java.lang.String |
PARAMETER_APPLY_TO_SPECIAL_FEATURES
The parameter name for "Filter also special attributes (label, id...) |
static java.lang.String |
PARAMETER_ATTRIBUTES
The parameter name for "The specified values will be merged in all attributes specified by the given regular expression. |
static java.lang.String |
PARAMETER_CONSIDER_REGULAR_EXPRESSIONS
The parameter name for "Enables matching based on regular expressions; original values may be specified as regular expressions. |
static java.lang.String |
PARAMETER_DEFAULT_VALUE
The parameter name for "The default value all original values are mapped to, if add_default_mapping is set to true. |
static java.lang.String |
PARAMETER_OLD_VALUES
The parameter name for "The second value which should be merged. |
static java.lang.String |
PARAMETER_REPLACE_BY
The parameter name for "The new attribute value to use. |
static java.lang.String |
PARAMETER_REPLACE_WHAT
The parameter name for "All occurrences of this value will be replaced. |
static java.lang.String |
PARAMETER_VALUE_MAPPINGS
The parameter name for "The first value which should be merged. |
| Constructor Summary | |
|---|---|
AttributeValueMapper(OperatorDescription description)
|
|
| Method Summary | |
|---|---|
ExampleSet |
apply(ExampleSet exampleSet)
Delegate for the apply method. |
java.util.List<ParameterType> |
getParameterTypes()
Returns a list of ParameterTypes describing the parameters of this operator. |
| Methods inherited from class com.rapidminer.operator.AbstractExampleSetProcessing |
|---|
apply, getInputClasses, getOutputClasses |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PARAMETER_ATTRIBUTES
public static final java.lang.String PARAMETER_APPLY_TO_SPECIAL_FEATURES
public static final java.lang.String PARAMETER_VALUE_MAPPINGS
public static final java.lang.String PARAMETER_OLD_VALUES
public static final java.lang.String PARAMETER_REPLACE_WHAT
public static final java.lang.String PARAMETER_REPLACE_BY
public static final java.lang.String PARAMETER_CONSIDER_REGULAR_EXPRESSIONS
public static final java.lang.String PARAMETER_ADD_DEFAULT_MAPPING
public static final java.lang.String PARAMETER_DEFAULT_VALUE
| Constructor Detail |
|---|
public AttributeValueMapper(OperatorDescription description)
| Method Detail |
|---|
public ExampleSet apply(ExampleSet exampleSet)
throws OperatorException
AbstractExampleSetProcessing
apply in class AbstractExampleSetProcessingOperatorExceptionpublic java.util.List<ParameterType> getParameterTypes()
Operator
getParameterTypes in interface ParameterHandlergetParameterTypes in class Operator
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||