perceptronpredict
Predicts target values for the test data points using parameters computed by perceptronFit function
Attention: Available only with Twin Activate commercial edition.
Syntax
predictions = perceptronpredict(parameters,X)
[predictions, probability] = perceptronpredict(parameters,X)
Inputs
- parameters
- Output of perceptronFit function.
- X
- Test data.
Outputs
- predictions
- Predictions for the test data.
- probability
- Probability of the test data being in a class.
Example
Usage of perceptronpredict
data = dlmread('banknote_authentication.txt', ',');
X = data(:, 1:2);
y = data(:, end);
parameters = perceptronfit(X, y);
predictions= perceptronpredict(parameters, X);
> mean(predictions == y')
ans = 0.847667638