Class NaiveBayesClassifierEx3.TestGaussFcn1

java.lang.Object
com.imsl.test.example.datamining.NaiveBayesClassifierEx3.TestGaussFcn1
All Implemented Interfaces:
Distribution, ProbabilityDistribution, Serializable
Enclosing class:
NaiveBayesClassifierEx3

public static class NaiveBayesClassifierEx3.TestGaussFcn1 extends Object implements ProbabilityDistribution

Defines the user supplied probability distribution.

In this case, the probability distribution is Gaussian and results should match the default case in Example 1.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    TestGaussFcn1(double mean, double stdev)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    eval(double[] xData)
    Evaluation method to fit the user-supplied probability density function to input data
    double[]
    eval(double[] xData, Object[] Params)
    Evaluates the user-supplied probability density of each value in xData using the supplied probability distribution parameters.
    double
    eval(double xData, Object[] Params)
    Evaluation method for the user-supplied distribution function and parameters.
    Returns the current parameters of the probability density function.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TestGaussFcn1

      public TestGaussFcn1(double mean, double stdev)
  • Method Details

    • eval

      public double[] eval(double[] xData)
      Description copied from interface: Distribution
      Evaluation method to fit the user-supplied probability density function to input data
      Specified by:
      eval in interface Distribution
      Parameters:
      xData - a double array representing the points at which the probability density function is to be evaluated.
      Returns:
      a double array representing the probability density at each value of xData
    • eval

      public double[] eval(double[] xData, Object[] Params)
      Description copied from interface: ProbabilityDistribution
      Evaluates the user-supplied probability density of each value in xData using the supplied probability distribution parameters.
      Specified by:
      eval in interface ProbabilityDistribution
      Parameters:
      xData - a double array containing the points at which the probability density function is to be evaluated
      Params - an Object array containing the probability distribution parameters to be used in evaluating xData, see method getParameters
      Returns:
      a double array representing the probability density of each value in xData
    • eval

      public double eval(double xData, Object[] Params)
      Description copied from interface: ProbabilityDistribution
      Evaluation method for the user-supplied distribution function and parameters. Evaluates the user-supplied probability density at xData using the supplied probability distribution parameters.
      Specified by:
      eval in interface ProbabilityDistribution
      Parameters:
      xData - a double scalar value containing the point the distribution function is to evaluate
      Params - an Object array containing the probability distribution parameters to be used in evaluating xData. See method getParameters.
      Returns:
      a double scalar value representing the probability density at xData
    • getParameters

      public Object[] getParameters()
      Description copied from interface: ProbabilityDistribution
      Returns the current parameters of the probability density function.
      Specified by:
      getParameters in interface ProbabilityDistribution
      Returns:
      an Object array containing the parameters resulting from the last invocation of the (Distribution) eval method with the following signature, double[] eval(double[] xData). This Object array can be used as input to the eval methods that require an Object array of distribution parameters as input.