DataPredict

API Reference - Models - MeanShift

MeanShift is a an unsupervised machine learning model that finds cluster centers by moving points towards higher density regions.

Stored Model Parameters

Contains a matrix.

Constructors

new()

Create new model object. If any of the arguments are nil, default argument values for that argument will be used.

MeanShift.new(maximumNumberOfIterations: integer, bandwidth: number, distanceFunction: string, kernelFunction: string, kernelParameters: table): ModelObject

Parameters:

Returns:

Functions

setParameters()

Set model’s parameters. When any of the arguments are nil, previous argument values for that argument will be used.

MeanShift:setParameters(maximumNumberOfIterations: integer, bandwidth: number, distanceFunction: string, kernelFunction: string, kernelParameters: table)

Parameters:

train()

Train the model.

MeanShift:train(featureMatrix: Matrix)

Parameters:

Returns:

predict()

Predict which clusters does it belong to for a given data.

MeanShift:predict(featureMatrix: Matrix): integer, number

Parameters:

Returns:

Inherited From