|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.mine.decisiontree2.PMMLPredicate
org.knime.base.node.mine.decisiontree2.PMMLSimpleSetPredicate
public class PMMLSimpleSetPredicate
Implements a SimpleSetPredicate as specified in PMML (http://www.dmg.org/v4-0/TreeModel.html).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.knime.base.node.mine.decisiontree2.PMMLPredicate |
---|
PMMLPredicate.PMMLPredicates |
Field Summary | |
---|---|
static String |
NAME
The string representation of the predicate's XML-element. |
Fields inherited from class org.knime.base.node.mine.decisiontree2.PMMLPredicate |
---|
ATTRIBUTE_KEY, CDATA, NUMBERFORMAT, OPERATOR_KEY, TYPE_KEY |
Constructor Summary | |
---|---|
PMMLSimpleSetPredicate(String attribute,
PMMLSetOperator operator)
Build a new simple set predicate without values. |
|
PMMLSimpleSetPredicate(String attribute,
String operator)
Build a new simple set predicate without values. |
Method Summary | |
---|---|
Boolean |
evaluate(DataRow row,
DataTableSpec spec)
Evaluates the predicate for the passed parameters and returns the result. |
PMMLArrayType |
getArrayType()
Returns the data type of the contained array. |
String |
getName()
Returns the name of the predicate. |
PMMLSetOperator |
getSetOperator()
|
Set<String> |
getValues()
Returns the array values. |
void |
loadFromPredParams(Config conf)
Load internal predicate settings from a config object. |
void |
saveToPredParams(Config conf)
Save internal predicate settings to a config object. |
void |
setArrayType(PMMLArrayType arrayType)
Sets the data type of the contained array. |
void |
setArrayType(String arrayType)
Sets the data type of the contained array. |
void |
setOperator(String op)
|
void |
setValues(LinkedHashSet<String> values)
Sets the array values. |
void |
setValues(List<String> values)
Sets the array values. |
String |
toString()
|
void |
writePMML(TransformerHandler handler)
Writes the PMML XML object for the predicate. |
Methods inherited from class org.knime.base.node.mine.decisiontree2.PMMLPredicate |
---|
cacheSpec, getOperator, getPredicateForConfig, getPredicateForType, getPreviousIndex, getPreviousSpec, getSplitAttribute, setOperator, setPreviousIndex, setPreviousSpec, setSplitAttribute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String NAME
Constructor Detail |
---|
public PMMLSimpleSetPredicate(String attribute, String operator)
attribute
- the field the predicate is applied onoperator
- the string representation of the set operatorpublic PMMLSimpleSetPredicate(String attribute, PMMLSetOperator operator)
attribute
- the field the predicate is applied onoperator
- the PMML set operatorMethod Detail |
---|
public PMMLArrayType getArrayType()
public void setArrayType(String arrayType)
arrayType
- the arrayType to setpublic void setArrayType(PMMLArrayType arrayType)
arrayType
- the arrayType to setpublic PMMLSetOperator getSetOperator()
public void setOperator(String op)
setOperator
in class PMMLPredicate
op
- the op to setpublic Set<String> getValues()
public void setValues(List<String> values)
values
- the values to setpublic void setValues(LinkedHashSet<String> values)
values
- the values to setpublic Boolean evaluate(DataRow row, DataTableSpec spec)
evaluate
in class PMMLPredicate
row
- The data row containing the data cells to be evaluated.spec
- The spec for the row.
public String getName()
getName
in class PMMLPredicate
public String toString()
toString
in class PMMLPredicate
public void writePMML(TransformerHandler handler) throws SAXException
writePMML
in class PMMLPredicate
handler
- TransformerHandler for parsing and transforming events
SAXException
- - any SAX exception, possibly wrapping another
exceptionpublic void loadFromPredParams(Config conf) throws InvalidSettingsException
loadFromPredParams
in class PMMLPredicate
conf
- the config object to load from
InvalidSettingsException
- - if invalid settings are providedpublic void saveToPredParams(Config conf)
saveToPredParams
in class PMMLPredicate
conf
- the config object to write into
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |