public class UnivariateGaussianMixtureModel extends Object
| Modifier and Type | Field and Description |
|---|---|
PVector[] |
param |
int[] |
pos |
int |
size |
double[] |
weight |
| Constructor and Description |
|---|
UnivariateGaussianMixtureModel()
Class constructor.
|
UnivariateGaussianMixtureModel(int n) |
| Modifier and Type | Method and Description |
|---|---|
UnivariateGaussianMixtureModel |
clone()
Creates and returns a copy of the instance.
|
double |
density(Point x)
Computes the density value of this mixture value.
|
static double |
densityOfGaussian(Point x,
PVector param)
Computes the density value \f$ f(x;\mu,\sigma^2) \f$.
|
static Point |
drawRandomPointFromGaussian(PVector L)
Draws a point from the considered distribution.
|
Point[] |
drawRandomPoints(int m)
Draws points from the considered mixture model.
|
int |
getDimension()
Return the dimension of the parameters of the mixture model.
|
void |
normalizeWeights()
Normalizes the weights of the mixture models \f$ \alpha_i \f$ such as \f$ \sum_{i=1}^n \alpha_i
= 1 \f$.
|
void |
setSize(int n) |
String |
toString()
Method toString.
|
public int size
public double[] weight
public int[] pos
public PVector[] param
public UnivariateGaussianMixtureModel()
public UnivariateGaussianMixtureModel(int n)
public void setSize(int n)
public double density(Point x)
x - a pointpublic void normalizeWeights()
public String toString()
public UnivariateGaussianMixtureModel clone()
public int getDimension()
public Point[] drawRandomPoints(int m)
m - number of points to drawpublic static double densityOfGaussian(Point x, PVector param)
x - pointparam - parameters (source, natural, or expectation)Copyright © 2015. All rights reserved.