org.knime.base.node.preproc.pmml.binner
Class PMMLBinningTranslator

java.lang.Object
  extended by org.knime.base.node.preproc.pmml.binner.PMMLBinningTranslator
All Implemented Interfaces:
PMMLPreprocTranslator

public class PMMLBinningTranslator
extends Object
implements PMMLPreprocTranslator


Constructor Summary
PMMLBinningTranslator()
          Creates a new empty translator to be initialized by one of the initializeFrom methods.
PMMLBinningTranslator(Map<String,BinnerColumnFactory.Bin[]> columnToBins, Map<String,String> columnToAppended, DerivedFieldMapper mapper)
          Creates an initialized translator for export to PMML.
 
Method Summary
 org.dmg.pmml40.LocalTransformationsDocument.LocalTransformations exportToLocalTrans()
          Exports the translators state to a new LocalTransformations element.
 org.dmg.pmml40.TransformationDictionaryDocument.TransformationDictionary exportToTransDict()
          Exports the translators state to a new TransformationDictionary element.
 List<Integer> initializeFrom(org.dmg.pmml40.DerivedFieldDocument.DerivedField[] derivedFields)
          Initializes the translator based on a derived field array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PMMLBinningTranslator

public PMMLBinningTranslator()
Creates a new empty translator to be initialized by one of the initializeFrom methods.


PMMLBinningTranslator

public PMMLBinningTranslator(Map<String,BinnerColumnFactory.Bin[]> columnToBins,
                             Map<String,String> columnToAppended,
                             DerivedFieldMapper mapper)
Creates an initialized translator for export to PMML.

Parameters:
columnToBins - the colums to bin
columnToAppended - mapping of existing column names to binned column names that are appended
mapper - mapping data column names to PMML derived field names and vice versa
Method Detail

exportToTransDict

public org.dmg.pmml40.TransformationDictionaryDocument.TransformationDictionary exportToTransDict()
Exports the translators state to a new TransformationDictionary element.

Specified by:
exportToTransDict in interface PMMLPreprocTranslator
Returns:
the transformation dictionary containing the preprocessing elements

exportToLocalTrans

public org.dmg.pmml40.LocalTransformationsDocument.LocalTransformations exportToLocalTrans()
Exports the translators state to a new LocalTransformations element.

Specified by:
exportToLocalTrans in interface PMMLPreprocTranslator
Returns:
the local transformations containing the preprocessing elements

initializeFrom

public List<Integer> initializeFrom(org.dmg.pmml40.DerivedFieldDocument.DerivedField[] derivedFields)
Initializes the translator based on a derived field array.

Specified by:
initializeFrom in interface PMMLPreprocTranslator
Parameters:
derivedFields - the derived fields to initialize from
Returns:
a list with the indices of all derived field entries that could be consumed


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.