SimoneAlbertini/RBMcpp
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
This code is not perfectly engineered bacause was developed for research purpose. You are wellcome to submit pull requests if you extend it or you find and correct any bug. Requirements ----- * C++08 compiler (actually used gcc/g++ 4.8.1) * OpenCv 2.4.* with Qt 4 support enabled * gnuplot installed on the system. Some helper functions in rbmUtils rely on unix API to call gnuplot. You can exclude the code that relies on them just removing from the source code the display of the weight histogram. Usage ----- > unzip data.zip > make clean && make > ./demo The program uses graphical interface to show the bases and the distribution of the weights. The demo code will train a Gaussian-Bernoulli RBM on 9000 images from the MNIST Dataset resized to 16x16 pixels. The vectors stored in the ".mat" files are the raw intensity values of the pixels with range in [0,1] where each feature (dimension of the vectors) is normalized to have 0 mean and unitary variance. The learnt features are used to train a Linear Support Vector Machine doing a grid search for the parameter C. Once trained, the code measures the overall classification accuracy (true positives / total samples) on both train and (unseen) test set. PS. When asked to press keys, focus on the GUI. Acknowledgments ----- Read LICENSE for the terms of usage. If you found this code useful, please cite the following article: Unsupervised feature learning for sentiment classification of short documents S. Albertini, A. Zamberletti and I. Gallo Journal for Language Technology and Computational Linguistics (JLCL), 2014 (The article should be in press within summer 2014)