org.android.activityminer.pmml.model.knn
Class KNNInput

Package class diagram package KNNInput
java.lang.Object
  extended by org.android.activityminer.pmml.model.knn.KNNInput

public class KNNInput
extends Object

The knn input representation (without extensions)


Field Summary
private  CompareFunctionType compareFunction
          Each field has a compareFunction attribute, this is either defined as default in element ComparisonMeasure or it can be defined per KNNInput.
private  String field
          Contains the name of a DataField or a DerivedField.
private  double fieldWeight
          Defines the importance factor for the field.
 
Constructor Summary
KNNInput()
           
 
Method Summary
 CompareFunctionType getCompareFunction()
          Getter for the compareFunction
 String getField()
          Getter for the field
 double getFieldWeight()
          Getter for the fieldWeight
 void setCompareFunction(CompareFunctionType compareFunction)
          Setter for the compareFunction
 void setField(String field)
          Setter for the field
 void setFieldWeight(double fieldWeight)
          Setter for the fieldWeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

field

private String field
Contains the name of a DataField or a DerivedField. If a DerivedField is used and isTransformed is false, the training instances will also need to be transformed together with the k-NN input.


fieldWeight

private double fieldWeight
Defines the importance factor for the field. It is used in the comparison functions to compute the comparison measure. The value must be a number greater than 0. The default value is 1.0.


compareFunction

private CompareFunctionType compareFunction
Each field has a compareFunction attribute, this is either defined as default in element ComparisonMeasure or it can be defined per KNNInput.

Constructor Detail

KNNInput

public KNNInput()
Method Detail

setField

public void setField(String field)
Setter for the field

Parameters:
field - the field to set

getField

public String getField()
Getter for the field

Returns:
the field

setFieldWeight

public void setFieldWeight(double fieldWeight)
Setter for the fieldWeight

Parameters:
fieldWeight - the fieldWeight to set

getFieldWeight

public double getFieldWeight()
Getter for the fieldWeight

Returns:
the fieldWeight

setCompareFunction

public void setCompareFunction(CompareFunctionType compareFunction)
Setter for the compareFunction

Parameters:
compareFunction - the compareFunction to set

getCompareFunction

public CompareFunctionType getCompareFunction()
Getter for the compareFunction

Returns:
the compareFunction