org.android.activityminer.pmml.model.miningschema
Class MiningField

Package class diagram package MiningField
java.lang.Object
  extended by org.android.activityminer.pmml.model.miningschema.MiningField

public class MiningField
extends Object

The minig field representation (without extensions)


Field Summary
private  Double highValue
          Used in conjunction with, and are required for, outlierTreatmentMethod="asExtremeValues" as values for records with outliers in this field.
private  Double importance
          States the relative importance of the field.
private  InvalidValueTreatmentMethod invalidValueTreatment
          This field specifies how invalid input values are handled. returnInvalid is the default and specifies that, when an invalid input is encountered, the model should return a value indicating an invalid result has been returned.
private  Double lowValue
          Used in conjunction with, and are required for, outlierTreatmentMethod="asExtremeValues" as values for records with outliers in this field.
private  String missingValueReplacement
          If this attribute is specified then a missing input value is automatically replaced by the given value.
private  MissingValueTreatmentMethod missingValueTreatment
          In a PMML consumer this field is for information only.
private  String name
          The symbolic name of field, must refer to a field in the scope of the parent of the MiningSchema's model element (e.g. the datadictionary).
private  OpTypes optype
          The attribute value overrides the corresponding value in the DataField.
private  OutlierTreatmentMethod outliers
          The treatment method for outliers.
private  FieldUsageType usageType
          The field FieldUsageType
 
Constructor Summary
MiningField()
           
 
Method Summary
 Double getHighValue()
          Getter for the highValue
 Double getImportance()
          Getter for the importance
 InvalidValueTreatmentMethod getInvalidValueTreatment()
          Getter for the invalidValueTreatment
 Double getLowValue()
          Getter for the lowValue
 String getMissingValueReplacement()
          Getter for the missingValueReplacement
 MissingValueTreatmentMethod getMissingValueTreatment()
          Getter for the missingValueTreatment
 String getName()
          Getter for the name
 OpTypes getOptype()
          Getter for the optype
 OutlierTreatmentMethod getOutliers()
          Getter for the outliers
 FieldUsageType getUsageType()
          Getter for the usage type
 void setHighValue(Double highValue)
          Setter for the highValue
 void setImportance(Double importance)
          Setter for the importance
 void setInvalidValueTreatment(InvalidValueTreatmentMethod invalidValueTreatment)
          Setter for the invalidValueTreatment
 void setLowValue(Double lowValue)
          Setter for the lowValue
 void setMissingValueReplacement(String missingValueReplacement)
          Setter for the missingValueReplacement
 void setMissingValueTreatment(MissingValueTreatmentMethod missingValueTreatment)
          Setter for the missingValueTreatment
 void setName(String name)
          Setter for the name
 void setOptype(OpTypes optype)
          Setter for the optype getOptype()
 void setOutliers(OutlierTreatmentMethod outliers)
          Setter for the outliers
 void setUsageType(FieldUsageType usageType)
          Setter for the usage type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private String name
The symbolic name of field, must refer to a field in the scope of the parent of the MiningSchema's model element (e.g. the datadictionary).


optype

private OpTypes optype
The attribute value overrides the corresponding value in the DataField. That is, a DataField can be used with different optypes in different models. For example, a 0/1 indicator could be used as a numeric input field in a regression model while the same field is used as a categorical field in a tree model


usageType

private FieldUsageType usageType
The field FieldUsageType


importance

private Double importance
States the relative importance of the field. This indicator is typically used in predictive models in order to rank fields by their predictive contribution. A value of 1.0 suggests that the target field is directly correlated to this field. A value of 0.0 suggests that the field is completely irrelevant. Most likely such a field would have usageType="supplementary" rather than usageType="active". Note that the importance cannot be negative. Unlike a Pearson correlation coefficient, it does not indicate the 'direction' of a correlation with a negative number if a higher field value correlates to a lower target value. There is no commonly accepted correlation measure that is applicable to all combinations of numeric and categorical fields. But this attribute is still useful as it provides a mechanism for representing the results of feature selection. Note that other mining standards such as JDM include algorithms for computing the importance of input fields. The results can be represented by this attribute in PMML


outliers

private OutlierTreatmentMethod outliers
The treatment method for outliers.

See Also:
OutlierTreatmentMethod

lowValue

private Double lowValue
Used in conjunction with, and are required for, outlierTreatmentMethod="asExtremeValues" as values for records with outliers in this field. Usage: if x

highValue

private Double highValue
Used in conjunction with, and are required for, outlierTreatmentMethod="asExtremeValues" as values for records with outliers in this field. Usage: if x>highValue then x = highValue Note that outliers applies only to fields defined in the MiningSchema and hence can not be used for DerivedFields.


missingValueReplacement

private String missingValueReplacement
If this attribute is specified then a missing input value is automatically replaced by the given value. That is, the model itself works as if the given value was found in the original input. For example the surrogate operator in TreeModel does not apply if the MiningField specifies a replacement value.


missingValueTreatment

private MissingValueTreatmentMethod missingValueTreatment
In a PMML consumer this field is for information only. The consumer only looks at missingValueReplacement - if a value is present it replaces missing values. The missingValueTreatment attribute just indicates how the missingValueReplacement was derived, but places no behavioral requirement on the consumer. MissingValueTreatment is a useful parameter in an API for training. The parameter can be copied into the PMML model. The scoring function, however, does not always know the actual mean, mode, median, etc. The corresponding value must be present in the attribute missingValueReplacement. The replacement value MUST be specified using the missingValueReplacement attribute. Specifications for missing values occur at a couple of places in PMML. 1. The external representation of missing values in not directly defined by PMML. A PMML consumer system may implement them as null values in a database, or as blank strings in a file, etc. 2. The DataDictionary allows for an optional list of values which indicate a missing value. E.g., the data source may use the string "-" or "NA". If such a value occurs in the input data, a PMML consumer must treat it as a missing value. 3. The MiningSchema within a model may define an optional replacement value. If an input value is missing, then a PMML consumer must replace it with the specified value. 4. For each PMML model type, there is a specific method how missing values are used in the computation of the score results.


invalidValueTreatment

private InvalidValueTreatmentMethod invalidValueTreatment
This field specifies how invalid input values are handled. returnInvalid is the default and specifies that, when an invalid input is encountered, the model should return a value indicating an invalid result has been returned. asIs means to use the input without modification. asMissing specifies that an invalid input value should be treated as a missing value and follow the behavior specified by the missingValueReplacement attribute if present (see above). If asMissing is specified but there is no respective missingValueReplacement present, a missing value is passed on for eventual handling by successive transformations via DerivedFields or in the actual mining model.

Constructor Detail

MiningField

public MiningField()
Method Detail

setName

public void setName(String name)
Setter for the name

Parameters:
name - the name to set

getName

public String getName()
Getter for the name

Returns:
the name

setOptype

public void setOptype(OpTypes optype)
Setter for the optype getOptype()

Parameters:
optype - the optype to set

getOptype

public OpTypes getOptype()
Getter for the optype

Returns:
the optype

setUsageType

public void setUsageType(FieldUsageType usageType)
Setter for the usage type

Parameters:
usageType - the usage type to set

getUsageType

public FieldUsageType getUsageType()
Getter for the usage type

Returns:
the usage type

getImportance

public Double getImportance()
Getter for the importance

Returns:
the importance

setImportance

public void setImportance(Double importance)
Setter for the importance

Parameters:
importance - the importance to set

setOutliers

public void setOutliers(OutlierTreatmentMethod outliers)
Setter for the outliers

Parameters:
outliers - the outliers to set

getOutliers

public OutlierTreatmentMethod getOutliers()
Getter for the outliers

Returns:
the outliers

getLowValue

public Double getLowValue()
Getter for the lowValue

Returns:
the lowValue

getHighValue

public Double getHighValue()
Getter for the highValue

Returns:
the highValue

getMissingValueReplacement

public String getMissingValueReplacement()
Getter for the missingValueReplacement

Returns:
the missingValueReplacement

setLowValue

public void setLowValue(Double lowValue)
Setter for the lowValue

Parameters:
lowValue - the lowValue to set

setHighValue

public void setHighValue(Double highValue)
Setter for the highValue

Parameters:
highValue - the highValue to set

setMissingValueReplacement

public void setMissingValueReplacement(String missingValueReplacement)
Setter for the missingValueReplacement

Parameters:
missingValueReplacement - the missingValueReplacement to set

setMissingValueTreatment

public void setMissingValueTreatment(MissingValueTreatmentMethod missingValueTreatment)
Setter for the missingValueTreatment

Parameters:
missingValueTreatment - the missingValueTreatment to set

getMissingValueTreatment

public MissingValueTreatmentMethod getMissingValueTreatment()
Getter for the missingValueTreatment

Returns:
the missingValueTreatment

setInvalidValueTreatment

public void setInvalidValueTreatment(InvalidValueTreatmentMethod invalidValueTreatment)
Setter for the invalidValueTreatment

Parameters:
invalidValueTreatment - the invalidValueTreatment to set

getInvalidValueTreatment

public InvalidValueTreatmentMethod getInvalidValueTreatment()
Getter for the invalidValueTreatment

Returns:
the invalidValueTreatment