org.knime.base.node.mine.sota.logic
Class SotaManager

java.lang.Object
  extended by org.knime.base.node.mine.sota.logic.SotaManager

public class SotaManager
extends Object

Author:
Kilian Thiel, University of Konstanz

Field Summary
static double LR_ANCESTOR
          Default value of the ancestor learningrate.
static double LR_ANCESTOR_MAX
          Maximal value of the ancestor learningrate.
static double LR_ANCESTOR_MIN
          Minimal value of the ancestor learningrate.
static double LR_SISTER
          Default value of the sister learningrate.
static double LR_SISTER_MAX
          Maximal value of the ancestor learningrate.
static double LR_SISTER_MIN
          Minimal value of the ancestor learningrate.
static double LR_WINNER
          Default value of the Winner learningrate.
static double LR_WINNER_MAX
          Maximal value of the Winner learningrate.
static double LR_WINNER_MIN
          Minimal value of the Winner learningrate.
static double MIN_ERROR
          Default value of minimal error.
static double MIN_ERROR_MAX
          Maximal value of minimal error.
static double MIN_ERROR_MIN
          Minimal value of minimal error.
static double MIN_RESOURCE
          Default value of minimal resource.
static double MIN_RESOURCE_MAX
          Maximal value of minimal resource.
static double MIN_RESOURCE_MIN
          Minimal value of minimal resource.
static double MIN_VARIABILITY
          Default value of minimal variability.
static double MIN_VARIABILITY_MAX
          Maximal value of minimal variability.
static double MIN_VARIABILITY_MIN
          Minimal value of minimal variability.
static boolean USE_HIERARCHICAL_FUZZY_DATA
          Is hierarchical fuzzy data used or not .
static boolean USE_VARIABILITY
          Default flag setting.
 
Constructor Summary
SotaManager()
          Creates new instance of SotaManager with default settings.
 
Method Summary
 double doCycle()
          Computes one cycle of the sota algorithm, does the spilt afterwards and returns the variability.
 double doEpoch()
          Computes one epoch of the sota algorithm and retunrs the error of the tree after this epoch.
 double doTraining()
          Trains the tree as many cycles as it takes to reduce the variability value to the given minimum and returns the variability value.
static void getCells(ArrayList<SotaTreeCell> cells, SotaTreeCell currentCell)
          Collects all cells of the tree recursive.
 double getCycle()
           
 int getDimension()
           
 String getDistance()
           
 double getEpoch()
           
 ExecutionMonitor getExecutionMonitor()
           
 DataArray getInDataContainer()
           
 double getLearningrateAncestor()
           
 double getLearningrateSister()
           
 double getLearningrateWinner()
           
 int getMaxHierarchicalLevel()
           
 double getMinError()
           
 double getMinResource()
           
 double getMinVariability()
           
 DataArray getOriginalData()
          Returns the original DataTableSpec.
 SotaTreeCell getRoot()
           
 void initializeTree(DataTable inData, DataArray originalData, ExecutionMonitor exec, int indexOfClassColumn)
          Initializes the tree by creating the root node and two children cells of the root node.
 boolean isTrained()
           
 boolean isUseHierarchicalFuzzyData()
           
 boolean isUseVariability()
           
 void readSettings(NodeSettingsRO settings, boolean validateOnly)
          Reads settings out of given NodeSettings object and validates it.
 void reset()
          Resets the SotaManager.
 void saveSettingsTo(NodeSettingsWO settings)
          Saves settings of algorithm to given NodeSettings object.
 void setDistance(String distance)
           
 void setInData(DataArray inData)
          Sets in data.
 void setLearningrateAncestor(double ancestor)
           
 void setLearningrateSister(double sister)
           
 void setLearningrateWinner(double winner)
           
 void setMaxHierarchicalLevel(int maxLevel)
          Sets the maximum heirarchical level.
 void setMinError(double error)
           
 void setMinResource(double resource)
           
 void setMinVariability(double variability)
           
 void setOriginalData(DataArray origData)
          Sets original data.
 void setRoot(SotaTreeCell root)
          Sets the root node.
 void setUseHierarchicalFuzzyData(boolean hierarchicalFuzzyData)
           
 void setUseVariability(boolean variability)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LR_WINNER

public static final double LR_WINNER
Default value of the Winner learningrate.

See Also:
Constant Field Values

LR_WINNER_MIN

public static final double LR_WINNER_MIN
Minimal value of the Winner learningrate.

See Also:
Constant Field Values

LR_WINNER_MAX

public static final double LR_WINNER_MAX
Maximal value of the Winner learningrate.

See Also:
Constant Field Values

LR_ANCESTOR

public static final double LR_ANCESTOR
Default value of the ancestor learningrate.

See Also:
Constant Field Values

LR_ANCESTOR_MIN

public static final double LR_ANCESTOR_MIN
Minimal value of the ancestor learningrate.

See Also:
Constant Field Values

LR_ANCESTOR_MAX

public static final double LR_ANCESTOR_MAX
Maximal value of the ancestor learningrate.

See Also:
Constant Field Values

LR_SISTER

public static final double LR_SISTER
Default value of the sister learningrate.

See Also:
Constant Field Values

LR_SISTER_MIN

public static final double LR_SISTER_MIN
Minimal value of the ancestor learningrate.

See Also:
Constant Field Values

LR_SISTER_MAX

public static final double LR_SISTER_MAX
Maximal value of the ancestor learningrate.

See Also:
Constant Field Values

MIN_VARIABILITY

public static final double MIN_VARIABILITY
Default value of minimal variability.

See Also:
Constant Field Values

MIN_VARIABILITY_MIN

public static final double MIN_VARIABILITY_MIN
Minimal value of minimal variability.

See Also:
Constant Field Values

MIN_VARIABILITY_MAX

public static final double MIN_VARIABILITY_MAX
Maximal value of minimal variability.

See Also:
Constant Field Values

MIN_RESOURCE

public static final double MIN_RESOURCE
Default value of minimal resource.

See Also:
Constant Field Values

MIN_RESOURCE_MIN

public static final double MIN_RESOURCE_MIN
Minimal value of minimal resource.

See Also:
Constant Field Values

MIN_RESOURCE_MAX

public static final double MIN_RESOURCE_MAX
Maximal value of minimal resource.

See Also:
Constant Field Values

MIN_ERROR

public static final double MIN_ERROR
Default value of minimal error.

See Also:
Constant Field Values

MIN_ERROR_MIN

public static final double MIN_ERROR_MIN
Minimal value of minimal error.

See Also:
Constant Field Values

MIN_ERROR_MAX

public static final double MIN_ERROR_MAX
Maximal value of minimal error.

See Also:
Constant Field Values

USE_VARIABILITY

public static final boolean USE_VARIABILITY
Default flag setting.

See Also:
Constant Field Values

USE_HIERARCHICAL_FUZZY_DATA

public static final boolean USE_HIERARCHICAL_FUZZY_DATA
Is hierarchical fuzzy data used or not .

See Also:
Constant Field Values
Constructor Detail

SotaManager

public SotaManager()
Creates new instance of SotaManager with default settings.

Method Detail

reset

public void reset()
Resets the SotaManager.


initializeTree

public void initializeTree(DataTable inData,
                           DataArray originalData,
                           ExecutionMonitor exec,
                           int indexOfClassColumn)
                    throws CanceledExecutionException
Initializes the tree by creating the root node and two children cells of the root node. The nodes data are the mean values of the input data rows.

Parameters:
inData - the table with the input data
originalData - the original data
exec - the execution monitor to set
indexOfClassColumn - The index of the column containing the class information. If value is -1 class values are ignored.
Throws:
CanceledExecutionException - if user canceled the process

doTraining

public double doTraining()
                  throws CanceledExecutionException
Trains the tree as many cycles as it takes to reduce the variability value to the given minimum and returns the variability value.

Returns:
the variability value
Throws:
CanceledExecutionException - if training has been canceled

doCycle

public double doCycle()
               throws CanceledExecutionException
Computes one cycle of the sota algorithm, does the spilt afterwards and returns the variability.

Returns:
the variability of the tree after this cycle
Throws:
CanceledExecutionException - if user canceled the process

doEpoch

public double doEpoch()
               throws CanceledExecutionException
Computes one epoch of the sota algorithm and retunrs the error of the tree after this epoch.

Returns:
the error of the tree after this epoch
Throws:
CanceledExecutionException - is execution was canceled.

getCells

public static void getCells(ArrayList<SotaTreeCell> cells,
                            SotaTreeCell currentCell)
Collects all cells of the tree recursive.

Parameters:
cells - the ArrayList to store the cells in
currentCell - the current cell to check

getLearningrateAncestor

public double getLearningrateAncestor()
Returns:
the learningrateAncestor

setLearningrateAncestor

public void setLearningrateAncestor(double ancestor)
Parameters:
ancestor - the learningrateAncestor to set

getLearningrateSister

public double getLearningrateSister()
Returns:
the learningrateSister

setLearningrateSister

public void setLearningrateSister(double sister)
Parameters:
sister - the learningrateSister to set

getLearningrateWinner

public double getLearningrateWinner()
Returns:
the learningrateWinner

setLearningrateWinner

public void setLearningrateWinner(double winner)
Parameters:
winner - the learningrateWinner to set

getMinError

public double getMinError()
Returns:
the minError

setMinError

public void setMinError(double error)
Parameters:
error - the minError to set

getMinResource

public double getMinResource()
Returns:
the minResource

setMinResource

public void setMinResource(double resource)
Parameters:
resource - the minResource to set

getMinVariability

public double getMinVariability()
Returns:
the minVariability

setMinVariability

public void setMinVariability(double variability)
Parameters:
variability - the minVariability to set

getDimension

public int getDimension()
Returns:
the dimension

getInDataContainer

public DataArray getInDataContainer()
Returns:
the inDataContainer

getRoot

public SotaTreeCell getRoot()
Returns:
the root

getCycle

public double getCycle()
Returns:
the cycle

getEpoch

public double getEpoch()
Returns:
the epoch

getExecutionMonitor

public ExecutionMonitor getExecutionMonitor()
Returns:
the execution monitor

isUseVariability

public boolean isUseVariability()
Returns:
the useVariability

setUseVariability

public void setUseVariability(boolean variability)
Parameters:
variability - the useVariability to set

getDistance

public String getDistance()
Returns:
the distance

setDistance

public void setDistance(String distance)
Parameters:
distance - the distance to set

isUseHierarchicalFuzzyData

public boolean isUseHierarchicalFuzzyData()
Returns:
the useHierarchicalFuzzyData

setUseHierarchicalFuzzyData

public void setUseHierarchicalFuzzyData(boolean hierarchicalFuzzyData)
Parameters:
hierarchicalFuzzyData - the useHierarchicalFuzzyData to set

isTrained

public boolean isTrained()
Returns:
the trained

getMaxHierarchicalLevel

public int getMaxHierarchicalLevel()
Returns:
the maxHierarchicalLevel

saveSettingsTo

public void saveSettingsTo(NodeSettingsWO settings)
Saves settings of algorithm to given NodeSettings object.

Parameters:
settings - NodeSettings object to store settings in

readSettings

public void readSettings(NodeSettingsRO settings,
                         boolean validateOnly)
                  throws InvalidSettingsException
Reads settings out of given NodeSettings object and validates it. If validateOnly is false, NodeSettings data will be stored in algorithm too.

Parameters:
settings - NodeSettings object to get settings from
validateOnly - if true, settings will be validated only, if false, settings will be stored in algorithm
Throws:
InvalidSettingsException - will be thrown if given settings are not valid

getOriginalData

public DataArray getOriginalData()
Returns the original DataTableSpec.

Returns:
the original DataTableSpec

setMaxHierarchicalLevel

public void setMaxHierarchicalLevel(int maxLevel)
Sets the maximum heirarchical level.

Parameters:
maxLevel - the maximum heirarchical level to set

setRoot

public void setRoot(SotaTreeCell root)
Sets the root node.

Parameters:
root - the root node to set

setInData

public void setInData(DataArray inData)
Sets in data.

Parameters:
inData - in data to set

setOriginalData

public void setOriginalData(DataArray origData)
Sets original data.

Parameters:
origData - original data to set


Copyright, 2003 - 2010. 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.