org.knime.core.node.port.pmml
Class PMMLPortObjectSpec
java.lang.Object
org.knime.core.node.port.pmml.PMMLPortObjectSpec
- All Implemented Interfaces:
- PortObjectSpec
public class PMMLPortObjectSpec
- extends Object
- implements PortObjectSpec
- Author:
- Fabian Dill, University of Konstanz
|
Field Summary |
static String |
KNIME
The application name for PMML generated with KNIME. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KNIME
public static final String KNIME
- The application name for PMML generated with KNIME.
- See Also:
- Constant Field Values
PMMLPortObjectSpec
PMMLPortObjectSpec(DataTableSpec dataDictionary,
List<String> preprocFields,
List<String> learningFields,
List<String> targetFields)
- PMMLPortObjectSpec should only be created by
PMMLPortObjectSpecCreator.
- Parameters:
dataDictionary - DataTableSpec describing the training datapreprocFields - all columns involved in preprocessing stepslearningFields - columns used for learning of the modeltargetFields - columns to be predicted
getPortObjectSpecSerializer
public static PortObjectSpec.PortObjectSpecSerializer<PMMLPortObjectSpec> getPortObjectSpecSerializer()
- Returns:
- the serializer
- See Also:
PortObjectSpec
getDataTableSpec
public DataTableSpec getDataTableSpec()
- Returns:
- the
DataTableSpec describing the training data
getLearningFields
public List<String> getLearningFields()
- Returns:
- those columns used for learning of the model
getLearningCols
public List<DataColumnSpec> getLearningCols()
- Returns:
- those columns used for learning of the model
getTargetFields
public List<String> getTargetFields()
- Returns:
- by the model predicted columns
getTargetCols
public List<DataColumnSpec> getTargetCols()
- Returns:
- those columns used for learning of the model
getPreprocessingFields
public List<String> getPreprocessingFields()
- Returns:
- those columns involved in preprocessing steps
getPreprocessingCols
public List<DataColumnSpec> getPreprocessingCols()
- Returns:
- those columns involved in preprocessing steps
getActiveFields
public Set<String> getActiveFields()
- Returns:
- those columns used for preprocessing and learning the model
getActiveCols
public List<DataColumnSpec> getActiveCols()
- Returns:
- those columns used for preprocessing and learning the model
writeHeader
public static void writeHeader(org.dmg.pmml40.PMMLDocument.PMML pmmlDoc)
- Parameters:
pmmlDoc - the PMML document to write the header to
saveTo
public void saveTo(PortObjectSpecZipOutputStream out)
throws IOException
- Parameters:
out - zipped stream to write the entries to
- Throws:
IOException - if something goes wrong
loadFrom
public static PMMLPortObjectSpec loadFrom(PortObjectSpecZipInputStream in)
throws IOException,
InvalidSettingsException
- Parameters:
in - stream reading the relevant files
- Returns:
- a completely loaded port object spec with
DataTableSpec,
and the sets of learning, ignored and target columns.
- Throws:
IOException - if something goes wrong
InvalidSettingsException - if something goes wrong
getViews
public JComponent[] getViews()
- The returned views are displayed in the out port view of the referring
node. Each component is displayed in an extra tab. The name of the
component is used as the title for the tab. It is important that no
external members are kept in the component so it can be deleted, when
the port object is deleted. If the port object has no view return an
empty array.
- Specified by:
getViews in interface PortObjectSpec
- Returns:
- an array of views for the port object spec, each displayed as a
tab in the out port view
writeMiningSchema
@Deprecated
public static void writeMiningSchema(PMMLPortObjectSpec portSpec,
TransformerHandler handler)
throws SAXException
- Deprecated.
- Writes the MiningSchema based upon the fields of the passed
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 and close the model
tag.
- Parameters:
portSpec - based upon this port object spec the mining schema is
writtenhandler - transformation handler to write to
PMMLPortObject.PMML_V3_1. This method fails if the version is
unsupported.
- Throws:
SAXException - if something goes wrong
Copyright, 2003 - 2012. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.