Implement useful machine learning method based on C++. The matrix operation relies on the eigen library and some methods uses opencv only for visualization.The machine method mainly include classification model such as SVM,logistic,decision tree,mlp etc, cluster model such as kmeans,gmm,dbscan,lvq etc and regression model such as linear regression.
This software has only been tested on ubuntu 16.04(x64), eigen3, opencv3.4. To install this package your compiler need to support C++11. All the machine learning methods shared the same interface which is convenient to call or modify.
git clone https://github.com/TJCVRS/machine-learning-package.git
Eigen3, boost and opencv required. Install them with
sudo apt-get install libopencv-dev libeigen3-dev libboost-all-dev
cd ROOT_FOLDER
mkdir build
cd build
cmake ..
make -j
This will compile a binary file. You can modified the main_test.cpp and the CMakeLists.txt file to compile different machine learning model binary file. And you can write your own derived trainer class to adaptive your own data format.
./bin_root/gmmCluster ../data/kmeans.txt ../data/kmeans.txt ../kmeans.txt
Origin data distribution is as follows
Clustering visualization result is as follows
./bin_root/dbscanCluster ../data/kmeans.txt ../data/kmeans.txt ../kmeans.txt
Origin data distribution is as follows
Clustering visualization result is as follows