Package pal.eval

Class ChiSquareValue

java.lang.Object
pal.eval.ChiSquareValue
All Implemented Interfaces:
MultivariateFunction

public class ChiSquareValue extends Object implements MultivariateFunction
computes chi-square value of a (parameterized) tree for its set of parameters (e.g., branch lengths) and a given distance matrix
Version:
$Id: ChiSquareValue.java,v 1.14 2002/12/05 04:27:28 matt Exp $
Author:
Korbinian Strimmer
  • Constructor Details

    • ChiSquareValue

      public ChiSquareValue(DistanceMatrix m, boolean w)
      initialization
      Parameters:
      m - distance matrix
      w - determines whether weighted or unweighted chi-squares are computed
  • Method Details

    • setTree

      public void setTree(Tree t)
      define (parameterized) tree
      Parameters:
      t - tree
    • getTree

      public Tree getTree()
      Returns the (parameterized) tree of this likelihood value.
    • compute

      public double compute()
      compute (weighted) least-square value for current tree (fixed branch lengths) return chi-square value
    • optimiseParameters

      public double optimiseParameters()
      optimise parameters of a tree by minimising its chi-square value (tree must be a ParameterizedTree)
      Returns:
      minimimum chi-square value
    • optimiseParameters

      public double optimiseParameters(MultivariateMinimum mm)
      optimise parameters of a tree by minimising its chi-square value (tree must be a ParameterizedTree)
      Parameters:
      mm - optimiser for ParameterizedTree
      Returns:
      minimum chi-square value
    • evaluate

      public double evaluate(double[] params)
      compute (weighted) least-squares value
      Specified by:
      evaluate in interface MultivariateFunction
      Parameters:
      params - parameters (branch lengths) of the tree
      Returns:
      function value
    • getNumArguments

      public int getNumArguments()
      get number of parameters in tree
      Specified by:
      getNumArguments in interface MultivariateFunction
      Returns:
      number of parameters
    • getLowerBound

      public double getLowerBound(int n)
      Description copied from interface: MultivariateFunction
      get lower bound of argument n
      Specified by:
      getLowerBound in interface MultivariateFunction
      Parameters:
      n - argument number
      Returns:
      lower bound
    • getUpperBound

      public double getUpperBound(int n)
      Description copied from interface: MultivariateFunction
      get upper bound of argument n
      Specified by:
      getUpperBound in interface MultivariateFunction
      Parameters:
      n - argument number
      Returns:
      upper bound
    • getOrthogonalHints

      public OrthogonalHints getOrthogonalHints()
      Specified by:
      getOrthogonalHints in interface MultivariateFunction
      Returns:
      null