Documentation ¶
Overview ¶
Package integrate implements a numerical integration of the likelihood curve for a diffusion model.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &command.Command{
Usage: `integrate [--ranges] [--stem <age>]
[--distribution <distribution>] [-p|--particles <number>]
[--min <float>] [--max <float>] [--mc <number>] [--parts <number>]
[--cpu <number>] [--nomat] <project-file>`,
Short: "integrate numerically the likelihood curve",
Long: `
Command integrate reads a PhyGeo project, and makes a numerical integration of
the likelihood function, using a diffusion model over a sphere, by reporting
the log likelihood values of different values of lambda.
By default, it will use geographic distributions stored as points (presence-
absence maps). If no there are no point distribution, or the flags --ranges is
defined, the continuous range maps will be used.
By default, an stem branch will be added to each tree using the 10% of the root
age. To set a different stem age use the flag --stem, the value should be in
million years.
The flags --min and --max defines the bounds for the values of the lambda
(concentration) parameter of the spherical normal (equivalent to the kappa
parameter of von Mises-Fisher distribution). The units of the lambda parameter
are in 1/radians^2. The default values are 0 and 1000.
If the flag --distribution is defined, it will sample from the indicated
distribution. The sintaxis for a distribution is:
<name>=<parameter>[,<parameter>...]
Valid distributions are:
gamma it requires two parameters, the shape (or alpha), and the rate
(or lambda).
As the usual objetive of sampling from a distribution is to retrieve the
reconstructions, the flag -p, or --particles, define the number of particles
used for the stochastic mapping. The results will be stored in the file called
"<project>-<tree>-sampling-<samples>x<particles>.tab", as a TSV file. If the
flag -o or --output is defined, the value of the flag will be used as a prefix
for the output file.
By default the command performs an stepwise integration, the flag --parts
indicates the number of segments using for the integration. The default value
is 1000. If the flag --mc is defined, it will perform a Monte Carlo
integration using the indicated number of samples.
Results will be written in the standard output, as a TSV table with the
following columns:
- tree, for the tree used in the sample
- lambda, for the value of lambda used in the sample
(in 1/radians^2)
- stdDev, for the standard deviation
(in Km/My)
- logLike, the log likelihood for the reconstruction
By default, all available CPUs will be used in the processing. Set --cpu flag
to use a different number of CPUs.
By default, if the base pixelation is smaller than 500 pixels at the equator,
it will build a distance matrix to speed up the search. As this matrix
consumes a lot of memory, this procedure can be disabled using the flag
--nomat.
`,
SetFlags: setFlags,
Run: run,
}
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.