|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.port.pmml.PMMLPortObjectSpec
public class PMMLPortObjectSpec
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObjectSpec |
---|
PortObjectSpec.PortObjectSpecSerializer<T extends PortObjectSpec> |
Field Summary | |
---|---|
protected static String |
CDATA
Constant for CDATA. |
protected static String |
DATA_DICT
Constant for DataDictionary. |
protected static String |
DATA_FIELD
Constant for DataField. |
protected static String |
MINING_FIELD
Constant for MiningField tag. |
protected static String |
MINING_SCHEMA
Constant for the MiningSchema tag. |
protected static String |
VALUE
Constant for Value. |
Constructor Summary | |
---|---|
PMMLPortObjectSpec(DataTableSpec dataDictionary,
List<String> learningCols,
List<String> ignoredCols,
List<String> targetCols)
|
Method Summary | |
---|---|
DataTableSpec |
getDataTableSpec()
|
static String |
getDataType(DataColumnSpec colSpec)
|
List<DataColumnSpec> |
getIgnoredCols()
|
List<String> |
getIgnoredFields()
|
List<DataColumnSpec> |
getLearningCols()
|
List<String> |
getLearningFields()
|
static PortObjectSpec.PortObjectSpecSerializer<PMMLPortObjectSpec> |
getPortObjectSpecSerializer()
|
List<DataColumnSpec> |
getTargetCols()
|
List<String> |
getTargetFields()
|
JComponent[] |
getViews()
The returned views are displayed in the out port view of the referring node. |
static PMMLPortObjectSpec |
loadFrom(PortObjectSpecZipInputStream in)
|
void |
saveTo(PortObjectSpecZipOutputStream out)
|
static void |
writeDataDictionary(DataTableSpec spec,
TransformerHandler handler)
Convenience method to write a PMML DataDictionary based on the data table spec. |
static void |
writeHeader(TransformerHandler handler)
|
static void |
writeMiningSchema(PMMLPortObjectSpec portSpec,
TransformerHandler handler)
Writes the MiningSchema based upon the fields of the passed PMMLPortObjectSpec . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String CDATA
protected static final String DATA_DICT
protected static final String DATA_FIELD
protected static final String VALUE
protected static final String MINING_FIELD
protected static final String MINING_SCHEMA
Constructor Detail |
---|
public PMMLPortObjectSpec(DataTableSpec dataDictionary, List<String> learningCols, List<String> ignoredCols, List<String> targetCols)
dataDictionary
- DataTableSpec
describing the training datalearningCols
- columns used for learning of the modelignoredCols
- columns ignored while learning the modeltargetCols
- columns to be predictedMethod Detail |
---|
public static PortObjectSpec.PortObjectSpecSerializer<PMMLPortObjectSpec> getPortObjectSpecSerializer()
PortObjectSpec
public DataTableSpec getDataTableSpec()
DataTableSpec
describing the training datapublic List<String> getLearningFields()
public List<DataColumnSpec> getLearningCols()
public List<String> getIgnoredFields()
public List<DataColumnSpec> getIgnoredCols()
public List<String> getTargetFields()
public List<DataColumnSpec> getTargetCols()
public static void writeDataDictionary(DataTableSpec spec, TransformerHandler handler) throws SAXException
spec
- the spec to be converted into a PMML DataDictionaryhandler
- th econtent handler to write to
SAXException
- if something goes wrong during writingpublic static String getDataType(DataColumnSpec colSpec)
colSpec
- the column spec to get the PMML data type attribute from
DataColumnSpec
public static void writeMiningSchema(PMMLPortObjectSpec portSpec, TransformerHandler handler) throws SAXException
PMMLPortObjectSpec
. Since the MiningSchema is inside the model
tag of the PMML file, implementing classes have to take open their model
tag, then call this method, write their model content andclose the model
tag.
portSpec
- based upon this port object spec the mining schema is
writtenhandler
- transformartion handler to write to
SAXException
- if something goes wrongpublic void saveTo(PortObjectSpecZipOutputStream out) throws IOException
out
- zipped stream to write the entries to
IOException
- if something goes wrongpublic static PMMLPortObjectSpec loadFrom(PortObjectSpecZipInputStream in) throws IOException, InvalidSettingsException
in
- stream reading the relevant files
DataTableSpec
,
and the sets of learning, ignored and target columns.
IOException
- if something goes wrong
InvalidSettingsException
- if something goes wrongpublic static void writeHeader(TransformerHandler handler) throws SAXException
handler
- the handler to write to
SAXException
- if something goes wrongpublic JComponent[] getViews()
getViews
in interface PortObjectSpec
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |