Package pal.eval
Class ChiSquareValue
java.lang.Object
pal.eval.ChiSquareValue
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptiondoublecompute()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 nintget number of parameters in treegetTree()Returns the (parameterized) tree of this likelihood value.doublegetUpperBound(int n) get upper bound of argument ndoubleoptimise parameters of a tree by minimising its chi-square value (tree must be a ParameterizedTree)doubleoptimise parameters of a tree by minimising its chi-square value (tree must be a ParameterizedTree)voiddefine (parameterized) tree
-
Constructor Details
-
ChiSquareValue
initialization- Parameters:
m- distance matrixw- determines whether weighted or unweighted chi-squares are computed
-
-
Method Details
-
setTree
define (parameterized) tree- Parameters:
t- 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
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
- Specified by:
getOrthogonalHintsin interfaceMultivariateFunction- Returns:
- null
-