DataPredict

API Reference - Models - AffinityPropagation

AffinityPropagation is an unsupervised machine learning model that predicts which cluster that the input belongs to using a similarity matrix that measures the similarity between each data point.

Stored Model Parameters

Contains a table.

Constructors

new()

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

AffinityPropagation.new(maximumNumberOfIterations: integer, distanceFunction: string, preferenceType: string, damping: number, preferenceValueArray: {number}): 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.

AffinityPropagation:setParameters(maximumNumberOfIterations: integer, distanceFunction: string, preferenceType: string, damping: number, preferenceValueArray: {number})

Parameters:

train()

Train the model.

AffinityPropagation:train(featureMatrix: Matrix)

Parameters:

Returns:

predict()

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

AffinityPropagation:predict(featureMatrix: Matrix): Matrix, Matrix

Parameters:

Returns:

Inherited From