dtcpredict

Predicts target values for the test data points using parameters computed by dtcFit function.

Attention: Available only with Twin Activate commercial edition.

Syntax

predictions = dtcpredict(parameters,X)

Inputs

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

Outputs

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

Example

Usage of dtcpredict

data = dlmread('iris.csv', ',', 1);
X = data(:,1:end-1);
y = data(:,end);

parameters = dtcfit(X, y);
predictions = dtcpredict(parameters, X);
> predictions(1:10)
ans = [Matrix] 1 x 10
0  0  0  0  0  0  0  0  0  0