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
(static) load(path) → {GaussianMixtureModel}
Parameters:
Name | Type | Description |
---|---|---|
path |
string |
Returns:
- Type
- GaussianMixtureModel
(static) read() → {MLReader}
Returns:
- Type
- MLReader
copy(extra) → {module:eclairjs/ml/clustering.GaussianMixtureModel}
Parameters:
Name | Type | Description |
---|---|---|
extra |
module:eclairjs/ml/param.ParamMap |
- Overrides:
- Source:
Returns:
gaussiansDF() → {module:eclairjs/sql.Dataset}
Retrieve Gaussian distributions as a DataFrame.
Each row represents a Gaussian Distribution.
Two columns are defined: mean and cov.
Schema:
Returns:
Example
root
|-- mean: vector (nullable = true)
|-- cov: matrix (nullable = true)
hasParent() → {Promise.<boolean>}
Indicates whether this Model has a corresponding parent.
- Inherited From:
- Source:
Returns:
- Type
- Promise.<boolean>
hasSummary() → {Promise.<boolean>}
Return true if there exists summary of model.
Returns:
- Type
- Promise.<boolean>
parent() → {module:eclairjs/ml.Estimator}
- Inherited From:
- Source:
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) → {module:eclairjs/sql.Dataset}
Parameters:
Name | Type | Description |
---|---|---|
dataset |
module:eclairjs/sql.Dataset |
- Overrides:
- Source:
Returns:
transformSchema(schema) → {StructType}
Parameters:
Name | Type | Description |
---|---|---|
schema |
module:eclairjs/sql/types.StructType |
Returns:
- Type
- StructType
uid() → {Promise.<string>}
An immutable unique ID for the object and its derivatives.
Returns:
- Type
- Promise.<string>
weights() → {Promise.<Array.<Number>>}
Returns:
- Type
- Promise.<Array.<Number>>
write() → {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.
Returns:
- Type
- MLWriter