Package pal.eval
Class ChiSquareValue
- java.lang.Object
-
- pal.eval.ChiSquareValue
-
- All Implemented Interfaces:
MultivariateFunction
public class ChiSquareValue extends java.lang.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 Summary
Constructors Constructor Description ChiSquareValue(DistanceMatrix m, boolean w)initialization
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecompute()compute (weighted) least-square value for current tree (fixed branch lengths) return chi-square valuedoubleevaluate(double[] params)compute (weighted) least-squares valuedoublegetLowerBound(int n)get lower bound of argument nintgetNumArguments()get number of parameters in treeOrthogonalHintsgetOrthogonalHints()TreegetTree()Returns the (parameterized) tree of this likelihood value.doublegetUpperBound(int n)get upper bound of argument ndoubleoptimiseParameters()optimise parameters of a tree by minimising its chi-square value (tree must be a ParameterizedTree)doubleoptimiseParameters(MultivariateMinimum mm)optimise parameters of a tree by minimising its chi-square value (tree must be a ParameterizedTree)voidsetTree(Tree t)define (parameterized) tree
-
-
-
Constructor Detail
-
ChiSquareValue
public ChiSquareValue(DistanceMatrix m, boolean w)
initialization- Parameters:
m- distance matrixw- determines whether weighted or unweighted chi-squares are computed
-
-
Method Detail
-
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:
evaluatein interfaceMultivariateFunction- Parameters:
params- parameters (branch lengths) of the tree- Returns:
- function value
-
getNumArguments
public int getNumArguments()
get number of parameters in tree- Specified by:
getNumArgumentsin interfaceMultivariateFunction- Returns:
- number of parameters
-
getLowerBound
public double getLowerBound(int n)
Description copied from interface:MultivariateFunctionget lower bound of argument n- Specified by:
getLowerBoundin interfaceMultivariateFunction- Parameters:
n- argument number- Returns:
- lower bound
-
getUpperBound
public double getUpperBound(int n)
Description copied from interface:MultivariateFunctionget upper bound of argument n- Specified by:
getUpperBoundin interfaceMultivariateFunction- Parameters:
n- argument number- Returns:
- upper bound
-
getOrthogonalHints
public OrthogonalHints getOrthogonalHints()
- Specified by:
getOrthogonalHintsin interfaceMultivariateFunction- Returns:
- null
-
-