#include <AdalineGD.h>
Adaline neuron classifier using gradient decent method
- Examples
- ds/TestAdalineGD.cpp.
◆ AdalineGD()
AdalineGD::AdalineGD |
( |
double |
_eta = 0.01 , |
|
|
int |
iter = 10 |
|
) |
| |
|
inlineexplicit |
default constructor
- Parameters
-
_eta | learning rate |
iter | max number iterations |
◆ activation()
Matrix< double > AdalineGD::activation |
( |
const Matrix< double > & |
X | ) |
|
|
inlineoverridevirtual |
activates given input
- Parameters
-
- Returns
- activated input
Implements ANNClassifier.
◆ costFunction()
double AdalineGD::costFunction |
( |
const Matrix< double > & |
X | ) |
|
|
inlineoverridevirtual |
calculates cost
$$\frac{\sum X^2}{2}
- Parameters
-
- Returns
- squared cost
Implements ANNClassifier.
◆ fit()
void AdalineGD::fit |
( |
const Matrix< double > & |
X, |
|
|
const Matrix< double > & |
y |
|
) |
| |
|
inlineoverridevirtual |
fit method to train the classifier using gradient decent method
- Parameters
-
Implements Predictor.
◆ netInput()
Matrix< double > AdalineGD::netInput |
( |
const Matrix< double > & |
X | ) |
|
|
inlineoverridevirtual |
calculates $$ X \cdot w + b
- Parameters
-
- Returns
Implements ANNClassifier.
◆ predict()
Matrix< double > AdalineGD::predict |
( |
const Matrix< double > & |
X | ) |
|
|
inlineoverridevirtual |
predicts class of given input
- Parameters
-
- Returns
- prediction
Implements Predictor.
The documentation for this class was generated from the following file: