public class ChiSquareValue extends java.lang.Object implements MultivariateFunction
| Constructor and Description |
|---|
ChiSquareValue(DistanceMatrix m,
boolean w)
initialization
|
| Modifier and Type | Method and Description |
|---|---|
double |
compute()
compute (weighted) least-square value
for current tree (fixed branch lengths)
return chi-square value
|
double |
evaluate(double[] params)
compute (weighted) least-squares value
|
double |
getLowerBound(int n)
get lower bound of argument n
|
int |
getNumArguments()
get number of parameters in tree
|
OrthogonalHints |
getOrthogonalHints() |
Tree |
getTree()
Returns the (parameterized) tree of this likelihood value.
|
double |
getUpperBound(int n)
get upper bound of argument n
|
double |
optimiseParameters()
optimise parameters of a tree by minimising its chi-square value
(tree must be a ParameterizedTree)
|
double |
optimiseParameters(MultivariateMinimum mm)
optimise parameters of a tree by minimising its chi-square value
(tree must be a ParameterizedTree)
|
void |
setTree(Tree t)
define (parameterized) tree
|
public ChiSquareValue(DistanceMatrix m, boolean w)
m - distance matrixw - determines whether weighted or
unweighted chi-squares are computedpublic void setTree(Tree t)
t - treepublic Tree getTree()
public double compute()
public double optimiseParameters()
public double optimiseParameters(MultivariateMinimum mm)
mm - optimiser for ParameterizedTreepublic double evaluate(double[] params)
evaluate in interface MultivariateFunctionparams - parameters (branch lengths) of the treepublic int getNumArguments()
getNumArguments in interface MultivariateFunctionpublic double getLowerBound(int n)
MultivariateFunctiongetLowerBound in interface MultivariateFunctionn - argument numberpublic double getUpperBound(int n)
MultivariateFunctiongetUpperBound in interface MultivariateFunctionn - argument numberpublic OrthogonalHints getOrthogonalHints()
getOrthogonalHints in interface MultivariateFunction