Package pal.eval
Class DemographicValue
- java.lang.Object
-
- pal.eval.DemographicValue
-
- All Implemented Interfaces:
MultivariateFunction
public class DemographicValue extends java.lang.Object implements MultivariateFunction
estimates demographic parameters by maximising the coalescent prior for a tree with given branch lengths.- Version:
- $Id: DemographicValue.java,v 1.6 2002/04/16 05:37:05 matt Exp $
- Author:
- Alexei Drummond
-
-
Field Summary
Fields Modifier and Type Field Description protected CoalescentIntervals
intervals
double
logL
Log-Likelihoodprotected DemographicModel
model
-
Constructor Summary
Constructors Constructor Description DemographicValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
compute()
compute log-likelihood for current model return negative log-likelihoodprotected void
computeLogLikelihood()
double
evaluate(double[] params)
compute function valueCoalescentIntervals
getCoalescentIntervals()
Returns the coalescent tree of this likelihood value.DemographicModel
getDemographicModel()
Returns the demographic model of this likelihood valuedouble
getLowerBound(int n)
get lower bound of argument nint
getNumArguments()
get number of argumentsOrthogonalHints
getOrthogonalHints()
double
getUpperBound(int n)
get upper bound of argument ndouble
optimize()
optimize log-likelihood using default optimizer return minimum negative log-likelihooddouble
optimize(MultivariateMinimum givenMvm)
optimize log-likelihood value and compute corresponding SEs given an optimizervoid
setCoalescentIntervals(CoalescentIntervals ci)
define coalescent tree.void
setDemographicModel(DemographicModel m)
define model
-
-
-
Field Detail
-
logL
public double logL
Log-Likelihood
-
intervals
protected CoalescentIntervals intervals
-
model
protected DemographicModel model
-
-
Method Detail
-
setDemographicModel
public void setDemographicModel(DemographicModel m)
define model- Parameters:
m
- model of demographic
-
getDemographicModel
public DemographicModel getDemographicModel()
Returns the demographic model of this likelihood value
-
getCoalescentIntervals
public CoalescentIntervals getCoalescentIntervals()
Returns the coalescent tree of this likelihood value.
-
setCoalescentIntervals
public void setCoalescentIntervals(CoalescentIntervals ci)
define coalescent tree.- Parameters:
t
- tree
-
compute
public double compute()
compute log-likelihood for current model return negative log-likelihood
-
optimize
public double optimize()
optimize log-likelihood using default optimizer return minimum negative log-likelihood
-
optimize
public double optimize(MultivariateMinimum givenMvm)
optimize log-likelihood value and compute corresponding SEs given an optimizer- Returns:
- minimimum negative log-likelihood value
-
evaluate
public double evaluate(double[] params)
Description copied from interface:MultivariateFunction
compute function value- Specified by:
evaluate
in interfaceMultivariateFunction
- Parameters:
params
- function argument (vector)- Returns:
- function value
-
getNumArguments
public int getNumArguments()
Description copied from interface:MultivariateFunction
get number of arguments- Specified by:
getNumArguments
in interfaceMultivariateFunction
- Returns:
- number of arguments
-
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
-
computeLogLikelihood
protected void computeLogLikelihood()
-
getOrthogonalHints
public OrthogonalHints getOrthogonalHints()
- Specified by:
getOrthogonalHints
in interfaceMultivariateFunction
- Returns:
- null
-
-