Constructor
new GaussianMixtureModel(weights, gaussians)
Parameters:
Name | Type | Description |
---|---|---|
weights |
Weight for each Gaussian distribution in the mixture. This is a multinomial probability distribution over the k Gaussians, where weights(i) is the weight for Gaussian i, and weights sum to 1. | |
gaussians |
Array of MultivariateGaussian where gaussians(i) represents the Multivariate Gaussian (Normal) Distribution for Gaussian i |
Extends
Methods
copy(extra) → {module:eclairjs/mllib/clustering.GaussianMixtureModel}
Parameters:
Name | Type | Description |
---|---|---|
extra |
module:eclairjs/ml/param.ParamMap |
- Overrides:
- Source:
Returns:
- Type
- module:eclairjs/mllib/clustering.GaussianMixtureModel
gaussiansDF() → {DataFrame}
Retrieve Gaussian distributions as a DataFrame.
Each row represents a Gaussian Distribution.
Two columns are defined: mean and cov.
Schema:
Returns:
- Type
- DataFrame
Example
root
|-- mean: vector (nullable = true)
|-- cov: matrix (nullable = true)
hasParent() → {boolean}
- Inherited From:
- Source:
Returns:
- Type
- boolean
hasSummary() → {boolean}
Return true if there exists summary of model.
Returns:
- Type
- boolean
load(path) → {module:eclairjs/mllib/clustering.GaussianMixtureModel}
Parameters:
Name | Type | Description |
---|---|---|
path |
string |
Returns:
- Type
- module:eclairjs/mllib/clustering.GaussianMixtureModel
parent() → {module:eclairjs/ml.Estimator}
- Inherited From:
- Source:
Returns:
read() → {module:eclairjs/ml/util.MLReader}
Returns:
setParent(parent) → {object}
Sets the parent of this model.
Parameters:
Name | Type | Description |
---|---|---|
parent |
module:eclairjs/ml.Estimator |
- Inherited From:
- Source:
Returns:
- Type
- object
summary() → {module:eclairjs/ml/clustering.GaussianMixtureSummary}
Gets summary of model on training set. An exception is
thrown if `trainingSummary == None`.
Returns:
transform(dataset) → {DataFrame}
Parameters:
Name | Type | Description |
---|---|---|
dataset |
module:eclairjs/sql.Dataset |
- Overrides:
- Source:
Returns:
- Type
- DataFrame
transformSchema(schema) → {module:eclairjs/sql/types.StructType}
Parameters:
Name | Type | Description |
---|---|---|
schema |
module:eclairjs/sql/types.StructType |
- Overrides:
- Source:
Returns:
weights()
Returns:
double[]
write() → {module:eclairjs/ml/util.MLWriter}
Returns a MLWriter instance for this ML instance.
For [[GaussianMixtureModel]], this does NOT currently save the training summary.
An option to save summary may be added in the future.