This project is named Pocky Machine Learning. It's a lightweight open source C++ machine learning library.
I'm a novice in ML, but I think I love it. So I will try my best to write this tool. Meanwhile the Chocolate bars of Pocky is so delicious.
//instantiate the model
kmeans_clusters mykmean;
mykmean.input_data(test_data);
//train and set the number of clusters is 3
mykmean.train(3);
//display the result
mykmean.display();
//instantiate the model
knn_model myknn;
myknn.input_data(test_data, label);
//set k=3,
result = myknn.classification(try_data,3);
//instantiate the model
ann_model myANN(data,lab);
//set the num of hidden nodes
myANN.init(10);
//set other parameters, learning_rate, iteration_times,
myANN.parameter_setting(0.02, 80000, 0.000000001);
//train and classify
myANN.train();
test_lab = myANN.classification(data);
//instantiate the model
PCA_model myPCA(test_data,row_num,col_num);
//computer the eigvalue and eigvector
myPCA.pca_solve_eig();
myPCA.print();
//instantiate the model
nb_model myNB(data,lab);
//train and classify
myNB.train();
test_lab = myNB.classification(data);
//instantiate the model
lr_model myLR(x,y);
//initialise the model
myLR.init();
//train hte model
myLR.train();
//regression
test_y = myLR.prediction(test_y);
//Makefile
make
./ann_test
./pca_test
./nb_test
./knn_test
./kmean_test
//Clean the object file and others
make clean
Issac (issac.sacrifice@gmail.com,from Zhejiang University)