public class DirichletDist extends ContinuousDistributionMulti
ContinuousDistributionMulti for the
Dirichlet distribution with parameters
(α1,...,αd),
αi > 0.
The probability density is
| Constructor and Description |
|---|
DirichletDist(double[] alpha) |
| Modifier and Type | Method and Description |
|---|---|
double |
density(double[] x)
Returns
f (x1, x2,…, xd), the probability density of
X evaluated at the point
x, where
x = {x1, x2,…, xd}.
|
static double |
density(double[] alpha,
double[] x)
Computes the density of the Dirichlet distribution
with parameters (α1,...,αd).
|
double[] |
getAlpha()
Returns the parameters (α1,...,αd) of this object.
|
double |
getAlpha(int i)
Returns the ith component of the alpha vector.
|
double[][] |
getCorrelation()
Returns the correlation matrix of the distribution, defined as
ρij = σij/(σ_iiσ_jj)1/2.
|
static double[][] |
getCorrelation(double[] alpha)
Computes the correlation matrix of the Dirichlet distribution
with parameters (α1,...,αd).
|
double[][] |
getCovariance()
Returns the variance-covariance matrix of the distribution, defined as
σij = E[(Xi - μi)(Xj - μj)]. |
static double[][] |
getCovariance(double[] alpha)
Computes the covariance matrix of the Dirichlet distribution
with parameters (α1,...,αd).
|
static double[] |
getMaximumLikelihoodEstimate(double[][] x,
int n,
int d)
Deprecated.
|
double[] |
getMean()
Returns the mean vector of the distribution, defined as
μi = E[Xi].
|
static double[] |
getMean(double[] alpha)
Computes the mean
E[X] = αi/α0 of the Dirichlet distribution
with parameters (α1,...,αd), where
α0 = ∑i=1dαi.
|
static double[] |
getMLE(double[][] x,
int n,
int d)
Estimates the parameters [
hat(α_1),…, hat(α_d)]
of the Dirichlet distribution using the maximum likelihood method.
|
void |
setParams(double[] alpha)
Sets the parameters (α1,...,αd) of this object.
|
getDimensionpublic double density(double[] x)
ContinuousDistributionMultidensity in class ContinuousDistributionMultix - value at which the density is evaluatedpublic double[] getMean()
ContinuousDistributionMultigetMean in class ContinuousDistributionMultipublic double[][] getCovariance()
ContinuousDistributionMultigetCovariance in class ContinuousDistributionMultipublic double[][] getCorrelation()
ContinuousDistributionMultigetCorrelation in class ContinuousDistributionMultipublic static double density(double[] alpha,
double[] x)
public static double[][] getCovariance(double[] alpha)
public static double[][] getCorrelation(double[] alpha)
@Deprecated
public static double[] getMaximumLikelihoodEstimate(double[][] x,
int n,
int d)
public static double[] getMLE(double[][] x,
int n,
int d)
x - the list of observations to use to evaluate parametersn - the number of observations to use to evaluate parametersd - the dimension of each vectorpublic static double[] getMean(double[] alpha)
public double[] getAlpha()
public double getAlpha(int i)
public void setParams(double[] alpha)
To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.