Class: GaussianMixtureModel

eclairjs/ml/clustering.GaussianMixtureModel

:: Experimental :: Multivariate Gaussian Mixture Model (GMM) consisting of k Gaussians, where points are drawn from each Gaussian i with probability weights(i).

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
Source:

Extends

Methods

(static) load(path) → {GaussianMixtureModel}

Parameters:
Name Type Description
path string
Source:
Returns:
Type
GaussianMixtureModel

(static) read() → {MLReader}

Source:
Returns:
Type
MLReader

copy(extra) → {module:eclairjs/ml/clustering.GaussianMixtureModel}

Parameters:
Name Type Description
extra module:eclairjs/ml/param.ParamMap
Overrides:
Source:
Returns:
Type
module:eclairjs/ml/clustering.GaussianMixtureModel

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:
Source:
Returns:
Type
module:eclairjs/sql.Dataset
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.
Source:
Returns:
Type
Promise.<boolean>

parent() → {module:eclairjs/ml.Estimator}

Inherited From:
Source:
Returns:
Type
module:eclairjs/ml.Estimator

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`.
Source:
Returns:
Type
module:eclairjs/ml/clustering.GaussianMixtureSummary

transform(dataset) → {module:eclairjs/sql.Dataset}

Parameters:
Name Type Description
dataset module:eclairjs/sql.Dataset
Overrides:
Source:
Returns:
Type
module:eclairjs/sql.Dataset

transformSchema(schema) → {StructType}

Parameters:
Name Type Description
schema module:eclairjs/sql/types.StructType
Source:
Returns:
Type
StructType

uid() → {Promise.<string>}

An immutable unique ID for the object and its derivatives.
Source:
Returns:
Type
Promise.<string>

weights() → {Promise.<Array.<Number>>}

Source:
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.
Source:
Returns:
Type
MLWriter