org.knime.base.node.preproc.autobinner
Class AutoBinner

java.lang.Object
  extended by org.knime.base.node.preproc.autobinner.AutoBinner

public class AutoBinner
extends Object

Creates Bins. Use this class in other nodes.

Author:
Heiko Hofer

Constructor Summary
AutoBinner(AutoBinnerLearnSettings settings)
           
 
Method Summary
 BufferedDataTable calcDomainBoundsIfNeccessary(BufferedDataTable data, ExecutionContext exec, List<String> recalcValuesFor)
          Determines the per column min/max values of the given data if not already present in the domain.
 PMMLPreprocDiscretize execute(BufferedDataTable data, ExecutionContext exec)
          Determine bins.
 PortObjectSpec[] getOutputSpec(DataTableSpec spec)
           
static void validateSettings(AutoBinnerLearnSettings settings)
          Validates the settings in the passed AutoBinnerLearnSettings object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoBinner

public AutoBinner(AutoBinnerLearnSettings settings)
           throws InvalidSettingsException
Parameters:
settings - The settings object.
Throws:
InvalidSettingsException - when settings are not consistent
Method Detail

execute

public PMMLPreprocDiscretize execute(BufferedDataTable data,
                                     ExecutionContext exec)
                              throws Exception
Determine bins.

Parameters:
data - the input data
exec - the execution context
Returns:
the operation with the discretisation information
Throws:
Exception

calcDomainBoundsIfNeccessary

public BufferedDataTable calcDomainBoundsIfNeccessary(BufferedDataTable data,
                                                      ExecutionContext exec,
                                                      List<String> recalcValuesFor)
                                               throws InvalidSettingsException,
                                                      CanceledExecutionException
Determines the per column min/max values of the given data if not already present in the domain.

Parameters:
data - the data
exec - the execution context
recalcValuesFor - The columns
Returns:
The data with extended domain information
Throws:
InvalidSettingsException
CanceledExecutionException

getOutputSpec

public PortObjectSpec[] getOutputSpec(DataTableSpec spec)
                               throws InvalidSettingsException
Parameters:
spec - The DataTableSpec of the input table.
Returns:
The spec of the output.
Throws:
InvalidSettingsException - If settings and spec given in the constructor are invalid.

validateSettings

public static void validateSettings(AutoBinnerLearnSettings settings)
                             throws InvalidSettingsException
Validates the settings in the passed AutoBinnerLearnSettings object. The specified settings is checked for completeness and consistency.

Parameters:
settings - The settings to validate.
Throws:
InvalidSettingsException - If the validation of the settings failed.


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.