53 if(i == 0)
weights(i, j) += update(i, j);
55 weights(i, j) += delta(i - 1, j);
Definition: Classifier.h:70
double eta
Learning rate.
Definition: Classifier.h:73
virtual Matrix< double > netInput(const Matrix< double > &)=0
virtual double costFunction(const Matrix< double > &)=0
int n_iter
number epochs
Definition: Classifier.h:75
virtual Matrix< double > activation(const Matrix< double > &)=0
ANNClassifier(double _eta, int _n_iter)
Definition: Classifier.h:78
Definition: Classifier.h:22
bool w_initialized
flag to initialize weights only once
Definition: Classifier.h:25
Matrix< double > weights
Vector holding weights.
Definition: Classifier.h:29
void initialize_weights(size_t numRows, size_t numColumns=1)
Definition: Classifier.h:45
Matrix< double > costs
Vector holding classification error per epoch.
Definition: Classifier.h:31
Matrix< double > transform(const Matrix< double > &in) override
Definition: Classifier.h:59
void update_weights(const Matrix< double > &update, const Matrix< double > &delta)
Definition: Classifier.h:50
Classifier()
Definition: Classifier.h:38
size_t rows() const
Definition: Matrix.h:193
size_t columns() const
Definition: Matrix.h:198
Definition: Predictor.h:5