com.rapidminer.tools.math.distribution
Class EmpiricalNormalDistribution

java.lang.Object
  extended by com.rapidminer.tools.math.distribution.ContinuousDistribution
      extended by com.rapidminer.tools.math.distribution.NormalDistribution
          extended by com.rapidminer.tools.math.distribution.EmpiricalNormalDistribution
All Implemented Interfaces:
Distribution, EmpiricalDistribution, java.io.Serializable, java.lang.Comparable<EmpiricalNormalDistribution>
Direct Known Subclasses:
NormalKernel

public class EmpiricalNormalDistribution
extends NormalDistribution
implements EmpiricalDistribution, java.lang.Comparable<EmpiricalNormalDistribution>

This class represents a gaussian normal distribution.

Author:
Tobias Malbrecht, Sebastian Land
See Also:
Serialized Form

Field Summary
protected  boolean recentlyUpdated
           
protected  double squaredSum
           
protected  double sum
           
protected  double totalWeightSum
           
 
Fields inherited from class com.rapidminer.tools.math.distribution.NormalDistribution
mean, standardDeviation
 
Constructor Summary
EmpiricalNormalDistribution()
           
 
Method Summary
 int compareTo(EmpiricalNormalDistribution otherDistribution)
           
 java.lang.String getAttributeName()
           
 double getLowerBound()
          This method returns a lower bound of values.
 double getMean()
           
 int getNumberOfParameters()
          This should return the number of parameters defining this distribution
 java.lang.String getParameterName(int index)
          This method should return the name of the i-th parameter
 double getParameterValue(int index)
          This method should return the value of the i-th parameter
 double getProbability(double value)
          This method returns the density of the given distribution at the specified value.
 double getStandardDeviation()
           
 double getTotalWeight()
           
 double getUpperBound()
          This method returns an upper bound of possible values.
 double getVariance()
           
 java.lang.String toString()
          Should return an textual representation of the distribution.
 void update(double value)
           
 void update(double value, double weight)
           
 void update(EmpiricalNormalDistribution distribution)
           
protected  void updateDistributionProperties()
           
 
Methods inherited from class com.rapidminer.tools.math.distribution.NormalDistribution
getLogProbability, getLowerBound, getProbability, getUpperBound
 
Methods inherited from class com.rapidminer.tools.math.distribution.ContinuousDistribution
isContinuous, isDiscrete, mapValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.tools.math.distribution.Distribution
isContinuous, isDiscrete, mapValue
 

Field Detail

recentlyUpdated

protected boolean recentlyUpdated

sum

protected double sum

squaredSum

protected double squaredSum

totalWeightSum

protected double totalWeightSum
Constructor Detail

EmpiricalNormalDistribution

public EmpiricalNormalDistribution()
Method Detail

update

public void update(double value,
                   double weight)
Specified by:
update in interface EmpiricalDistribution

update

public void update(double value)
Specified by:
update in interface EmpiricalDistribution

update

public void update(EmpiricalNormalDistribution distribution)

getAttributeName

public java.lang.String getAttributeName()
Specified by:
getAttributeName in interface Distribution
Overrides:
getAttributeName in class NormalDistribution

updateDistributionProperties

protected void updateDistributionProperties()

getProbability

public double getProbability(double value)
Description copied from interface: Distribution
This method returns the density of the given distribution at the specified value.

Specified by:
getProbability in interface Distribution
Overrides:
getProbability in class NormalDistribution
Parameters:
value - the value which density shall be returned

getMean

public double getMean()
Overrides:
getMean in class NormalDistribution

getStandardDeviation

public double getStandardDeviation()
Overrides:
getStandardDeviation in class NormalDistribution

getVariance

public double getVariance()
Overrides:
getVariance in class NormalDistribution

getLowerBound

public double getLowerBound()
Description copied from class: ContinuousDistribution
This method returns a lower bound of values. This bound should be given by the distributions tail, for example bounds should contain 95% interval. Nominal distributions should return NaN.

Overrides:
getLowerBound in class NormalDistribution

getUpperBound

public double getUpperBound()
Description copied from class: ContinuousDistribution
This method returns an upper bound of possible values. This bound should be given by the distributions tail, for example bounds should contain 95% interval. Nominal distributions should return NaN.

Overrides:
getUpperBound in class NormalDistribution

getTotalWeight

public double getTotalWeight()
Specified by:
getTotalWeight in interface EmpiricalDistribution

toString

public java.lang.String toString()
Description copied from interface: Distribution
Should return an textual representation of the distribution.

Specified by:
toString in interface Distribution
Overrides:
toString in class NormalDistribution

getNumberOfParameters

public int getNumberOfParameters()
Description copied from interface: Distribution
This should return the number of parameters defining this distribution

Specified by:
getNumberOfParameters in interface Distribution
Overrides:
getNumberOfParameters in class NormalDistribution

getParameterName

public java.lang.String getParameterName(int index)
Description copied from interface: Distribution
This method should return the name of the i-th parameter

Specified by:
getParameterName in interface Distribution
Overrides:
getParameterName in class NormalDistribution

getParameterValue

public double getParameterValue(int index)
Description copied from interface: Distribution
This method should return the value of the i-th parameter

Specified by:
getParameterValue in interface Distribution
Overrides:
getParameterValue in class NormalDistribution

compareTo

public int compareTo(EmpiricalNormalDistribution otherDistribution)
Specified by:
compareTo in interface java.lang.Comparable<EmpiricalNormalDistribution>


Copyright © 2001-2009 by Rapid-I