perceptronfit
Perceptron is a simple classification algorithm.
Syntax
parameters = perceptronfit(X,y)
parameters = perceptronfit(X,y,options)
Inputs
- X
- Training data.
- y
- Target values.
- options
- Type: struct
Outputs
- parameters
- Contains all the values passed to perceptronfit method as options. Additionally it has below key-value pairs.
Example
Usage of perceptronfit
data = dlmread('banknote_authentication.txt', ',');
X = data(:, 1:2);
y = data(:, end);
parameters = perceptronfit(X, y);
> parameters
parameters = struct [
alpha: 0.0001
coef: [Matrix] 1 x 2
-12.75121 -6.88289
early_stopping: 0
eta0: 1
intercept: 4
max_iter: 1000
n_features: 2
n_iter_no_change: 5
n_samples: 1372
shuffle: 1
tol: 0.001
validation_fraction: 0.1
]
Comments
Output 'parameters' should be passed as input to perceptronpredict function.