agglomerativepredict

Predicts target values for the test data points using parameters computed by agglomerativeFit function. In agglomerative clustering, again fitting is done with the given test data points and the options set during training. So instead can use the labels of the output of fit method.

Attention: Available only with Activate commercial edition.

Syntax

predictions = agglomerativepredict(parameters,X)

Inputs

X
Test data.
Type: double
Dimension: vector | matrix
parameters
Output of agglomerativeFit function.
Type: struct

Outputs

predictions
Predictions for the test data.
Type: double
Dimension: vector | matrix

Example

Usage of agglomerativepredict with options

rand('seed', 2);
XTrain = rand(14, 5);
XTest 	= rand(2, 5);

options = struct;
options.n_clusters = 2;

parameters = agglomerativefit(XTrain, options);
predictions = agglomerativepredict(parameters, XTest);
> predictions
predictions = [Matrix] 1 x 2
1  0