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 TypeMethodDescriptiondouble
compute()
compute (weighted) least-square value for current tree (fixed branch lengths) return chi-square valuedouble
evaluate
(double[] params) compute (weighted) least-squares valuedouble
getLowerBound
(int n) get lower bound of argument nint
get number of parameters in treegetTree()
Returns the (parameterized) tree of this likelihood value.double
getUpperBound
(int n) get upper bound of argument ndouble
optimise parameters of a tree by minimising its chi-square value (tree must be a ParameterizedTree)double
optimise parameters of a tree by minimising its chi-square value (tree must be a ParameterizedTree)void
define (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:
evaluate
in interfaceMultivariateFunction
- 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 interfaceMultivariateFunction
- 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 interfaceMultivariateFunction
- 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 interfaceMultivariateFunction
- Parameters:
n
- argument number- Returns:
- upper bound
-
getOrthogonalHints
- Specified by:
getOrthogonalHints
in interfaceMultivariateFunction
- Returns:
- null
-