org.knime.core.node.port.pmml
Class PMMLPortObjectSpecCreator

java.lang.Object
  extended by org.knime.core.node.port.pmml.PMMLPortObjectSpecCreator

public class PMMLPortObjectSpecCreator
extends Object

Author:
Fabian Dill, University of Konstanz, Dominik Morent, KNIME.com AG, Zuerich, Switzerland

Constructor Summary
PMMLPortObjectSpecCreator(DataTableSpec tableSpec)
           
PMMLPortObjectSpecCreator(PMMLPortObject portObject, DataTableSpec tableSpec)
          Creates a new PMMLPortObjectSpecCreator based on an existing PMMLPortObject.
PMMLPortObjectSpecCreator(PMMLPortObjectSpec portSpec)
          Creates a new PMMLPortObjectSpecCreator based on an existing PMMLPortObjectSpec.
PMMLPortObjectSpecCreator(PMMLPortObjectSpec portSpec, DataTableSpec tableSpec)
          Creates a new PMMLPortObjectSpecCreator based on an existing PMMLPortObjectSpec and a DataTableSpec.
 
Method Summary
 void addPreprocColNames(List<String> colNames)
          Adds the specified column names as preprocessing column.
 void addPreprocCols(List<DataColumnSpec> activeCols)
          Adds the specified columns as preprocessing column.
 PMMLPortObjectSpec createSpec()
          Creates a new PMMLPortObjectSpec based on the internal attributes of this creator.
 void setLearningCols(DataTableSpec tableSpec)
          Sets all columns of the data table spec as learning columns.
 void setLearningCols(List<DataColumnSpec> learningCols)
          Only double and nominal value compatible columns are yet supported for PMML models!
 void setLearningColsNames(List<String> learningCols)
          Only double and nominal value compatible columns are yet supported for PMML models!
 void setTargetCol(DataColumnSpec targetCol)
          Puts argument into set and call setTargetCols(List).
 void setTargetColName(String targetCol)
          Puts argument into set and call setTargetColsNames(List).
 void setTargetCols(List<DataColumnSpec> targetCols)
          Only double and nominal value compatible columns are yet supported for PMML models!
 void setTargetColsNames(List<String> targetCols)
          Only double and nominal value compatible columns are yet supported for PMML models!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PMMLPortObjectSpecCreator

public PMMLPortObjectSpecCreator(DataTableSpec tableSpec)
Parameters:
tableSpec - equivalent to the data dictionary

PMMLPortObjectSpecCreator

public PMMLPortObjectSpecCreator(PMMLPortObject portObject,
                                 DataTableSpec tableSpec)
Creates a new PMMLPortObjectSpecCreator based on an existing PMMLPortObject. If portObject is null it has the same effect as calling PMMLPortObjectSpecCreator(DataTableSpec).

Parameters:
portObject - the PMMLPortObject to base this instance on
tableSpec - the DataTableSpec

PMMLPortObjectSpecCreator

public PMMLPortObjectSpecCreator(PMMLPortObjectSpec portSpec,
                                 DataTableSpec tableSpec)
Creates a new PMMLPortObjectSpecCreator based on an existing PMMLPortObjectSpec and a DataTableSpec.

Parameters:
portSpec - the PMMLPortObjectSpec to base this instance on
tableSpec - the DataTableSpec

PMMLPortObjectSpecCreator

public PMMLPortObjectSpecCreator(PMMLPortObjectSpec portSpec)
Creates a new PMMLPortObjectSpecCreator based on an existing PMMLPortObjectSpec.

Parameters:
portSpec - the PMMLPortObjectSpec to base this instance on
Method Detail

setLearningColsNames

public void setLearningColsNames(List<String> learningCols)
Only double and nominal value compatible columns are yet supported for PMML models!

Parameters:
learningCols - the learningCols to set

setLearningCols

public void setLearningCols(List<DataColumnSpec> learningCols)
Only double and nominal value compatible columns are yet supported for PMML models!

Parameters:
learningCols - column used for training

setLearningCols

public void setLearningCols(DataTableSpec tableSpec)
                     throws InvalidSettingsException
Sets all columns of the data table spec as learning columns. Only double and nominal value compatible columns are yet supported for PMML models!

Parameters:
tableSpec - the table spec containing the columns to be added
Throws:
InvalidSettingsException - if a data column type is not compatible with double or nominal value (not supported by PMML)

setTargetColName

public void setTargetColName(String targetCol)
Puts argument into set and call setTargetColsNames(List).

Parameters:
targetCol - the target column to set

setTargetCol

public void setTargetCol(DataColumnSpec targetCol)
Puts argument into set and call setTargetCols(List).

Parameters:
targetCol - the target column to set

setTargetColsNames

public void setTargetColsNames(List<String> targetCols)
Only double and nominal value compatible columns are yet supported for PMML models!

Parameters:
targetCols - the targetCols to set

setTargetCols

public void setTargetCols(List<DataColumnSpec> targetCols)
Only double and nominal value compatible columns are yet supported for PMML models!

Parameters:
targetCols - predicted columns

addPreprocCols

public void addPreprocCols(List<DataColumnSpec> activeCols)
Adds the specified columns as preprocessing column. Nothing happens if they are already set as preprocessing column.

Parameters:
activeCols - active columns

addPreprocColNames

public void addPreprocColNames(List<String> colNames)
Adds the specified column names as preprocessing column. Nothing happens if they are already set as preprocessing column.

Parameters:
colNames - the names of the columns to be marked as active

createSpec

public PMMLPortObjectSpec createSpec()
Creates a new PMMLPortObjectSpec based on the internal attributes of this creator.

Returns:
created spec based upon the set attributes


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.