![]() |
AlgoPlus v0.1.0
|
logistic regression class The implementation follows this: https://www.stat.cmu.edu/~ryantibs/advmethods/notes/logreg.pdf More...
#include <log_reg.h>
Public Member Functions | |
logistic_regression (const std::vector< std::vector< double > > data, const double lr=0.001, const double bias=0.001, const int epochs=10) | |
default constructor for logistic regression class | |
void | fit () |
fits the input to the classifier, performs gradient descent using the predictors and learning rate. | |
logistic regression class The implementation follows this: https://www.stat.cmu.edu/~ryantibs/advmethods/notes/logreg.pdf
|
inlineexplicit |
default constructor for logistic regression class
data(vector<vector<double> | >): The passed data, x.back() for each x in data is the label of each data. So for example, let's assume x[0] = {1.2, 3.4, 5.4, 0.0}, 0 is the label for this row. |
lr(double) | learning rate |
bias(double) | the input bias |
epochs(int) | the number of epochs |