org.knime.base.node.mine.bfn.radial
Class RadialBasisFunctionPredictorRow

java.lang.Object
  extended by org.knime.base.node.mine.bfn.BasisFunctionPredictorRow
      extended by org.knime.base.node.mine.bfn.radial.RadialBasisFunctionPredictorRow

public class RadialBasisFunctionPredictorRow
extends BasisFunctionPredictorRow

A PNN rule used to predict unknown data.

Author:
Thomas Gabriel, University of Konstanz

Constructor Summary
(package private) RadialBasisFunctionPredictorRow(ModelContentRO pp)
          Creates a new predictor row based on the given model content.
protected RadialBasisFunctionPredictorRow(RowKey key, DataRow center, DataCell classLabel, double thetaMinus, int distance)
          Creates a new predictor for PNN rules.
 
Method Summary
 double compose(DataRow row, double act)
          Sum of the given activation plus the newly calculated one for the given row.
 double computeActivation(DataRow row)
          Calculates the current activation of this basis function given a input row which is always between 0.0 and 1.0 using the the hereinafter called distance function.
 double computeDistance(DataRow row)
          Computes the distance between this prototype's center vector and the given row.
 double computeSpread()
          Returns the standard deviation of this radial basisfunction.
 int getDistance()
           
 int getNrUsedFeatures()
          
(package private)  double getStdDev()
           
(package private)  boolean isNotShrunk()
           
 double overlap(BasisFunctionPredictorRow bf, boolean symmetric)
          Computes the overlapping based on the standard deviation of both radial basisfunctions.
 void save(ModelContentWO pp)
          Saves this row into a model content.
(package private)  void shrinkIt(double newStdDev)
          Shrinks this rules standard deviation by the new value.
 String toString()
          Returns a string representation of this basisfunction and the super implementation.
 
Methods inherited from class org.knime.base.node.mine.bfn.BasisFunctionPredictorRow
getClassLabel, getDontKnowClassDegree, getId, getNumAllCoveredPattern, getNumCorrectCoveredPattern, getNumWrongCoveredPattern, getVariance, overlapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RadialBasisFunctionPredictorRow

protected RadialBasisFunctionPredictorRow(RowKey key,
                                          DataRow center,
                                          DataCell classLabel,
                                          double thetaMinus,
                                          int distance)
Creates a new predictor for PNN rules.

Parameters:
key - The id for this rule.
center - The center vector.
classLabel - The class label.
thetaMinus - Theta minus.
distance - Distance measurement.

RadialBasisFunctionPredictorRow

RadialBasisFunctionPredictorRow(ModelContentRO pp)
                          throws InvalidSettingsException
Creates a new predictor row based on the given model content.

Parameters:
pp - Model content to read this rule from.
Throws:
InvalidSettingsException - If properties can't be read.
Method Detail

overlap

public double overlap(BasisFunctionPredictorRow bf,
                      boolean symmetric)
Computes the overlapping based on the standard deviation of both radial basisfunctions.

Specified by:
overlap in class BasisFunctionPredictorRow
Parameters:
symmetric - if the result is proportional to both basis functions, and thus symmetric, or if it is proportional to the area of the basis function on which the function is called.
bf - the other radial basisfunction to compute the overlap with
Returns:
true if both radial basisfunctions overlap

isNotShrunk

final boolean isNotShrunk()
Returns:
true If not yet shrunken.

getStdDev

final double getStdDev()
Returns:
The standard deviation of this radial basisfunction rule.

computeSpread

public double computeSpread()
Returns the standard deviation of this radial basisfunction.

Specified by:
computeSpread in class BasisFunctionPredictorRow
Returns:
the standard deviation

shrinkIt

final void shrinkIt(double newStdDev)
Shrinks this rules standard deviation by the new value.

Parameters:
newStdDev - The new value for the standard deviation.

computeDistance

public final double computeDistance(DataRow row)
Computes the distance between this prototype's center vector and the given row.

Specified by:
computeDistance in class BasisFunctionPredictorRow
Parameters:
row - the row to compute distance to
Returns:
the distance between prototype and given row

compose

public final double compose(DataRow row,
                            double act)
Sum of the given activation plus the newly calculated one for the given row.

Specified by:
compose in class BasisFunctionPredictorRow
Parameters:
row - row to get activation
act - activation
Returns:
the sum of both activations; greater or equal to zero
See Also:
computeActivation(DataRow)

computeActivation

public final double computeActivation(DataRow row)
Calculates the current activation of this basis function given a input row which is always between 0.0 and 1.0 using the the hereinafter called distance function.

Specified by:
computeActivation in class BasisFunctionPredictorRow
Parameters:
row - the row to compute activation for
Returns:
activation for the given input row

save

public void save(ModelContentWO pp)
Saves this row into a model content.

Overrides:
save in class BasisFunctionPredictorRow
Parameters:
pp - the model content to save this row to

toString

public final String toString()
Returns a string representation of this basisfunction and the super implementation. Here, the method adds properties such as the center vector and the standard deviation.

Overrides:
toString in class BasisFunctionPredictorRow
Returns:
a string representation for this radial basisfunction cell including the initial center vector and the radius of standard deviation

getNrUsedFeatures

public int getNrUsedFeatures()

Specified by:
getNrUsedFeatures in class BasisFunctionPredictorRow
Returns:
number of features that have been shrunken

getDistance

public final int getDistance()
Returns:
distance measure


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.