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 Twin Activate commercial edition.
Syntax
predictions = agglomerativepredict(parameters,X)
Inputs
- X
- Test data.
- parameters
- Output of agglomerativeFit function.
Outputs
- predictions
- Predictions for the test data.
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