Naive machine learning algorithm implementations in c++.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Common
LinearRegression
LogisticRegression
NeuralNetwork
SVM
Scripts
.gitignore
README.md

README.md

ML

Naive machine learning algorithm implementations in c++. I built these while taking Andrew Ng's machine learning course on Coursera.

Models

How to run

To run the code examples you will need to have Eigen installed.

Linear Regression

Navigate to the LinearRegression directory and run:

make
./mlinreg n < data/mdata1.txt

This will train a multivariate linear regression model on some data. The n flag tells the program to normalize the input data.

Other examples are found in the data subdirectory.

Logistic Regression

Navigate to the LogisticRegression directory and run:

make
./logreg n < data/data2.txt

This will train a logistic regression model on some data. The n flag tells the program to normalize the input data.

Other examples are found in the data subdirectory.

Neural Network

Navigate to the NeuralNetwork directory and run:

make
./nn d data/digits.txt

This will train a neural network to predict a digit from a 20x20 input image.

Support Vector Machine

Navigate to the SVM directory and run:

make
./svm < data/data2.txt

This will train a SVM model on some data.

Other examples are found in the data subdirectory.