git clone --recursive --branch stable --depth 1 https://github.com/Microsoft/LightGBM && \
mkdir LightGBM/build && \
cd LightGBM/build && \
cmake .. && \
make -j8 && \
make install && \
cd LightGBM/examples/binary_classification &&
lightgbm config=train.conf
We will get the output model: LightGBM_model.txt, it will be used in test.cpp
In test.cpp, row and row2 are from LightGBM/examples/binary_classification/binary.train
g++ -g -Wall -std=c++11 test.cpp -l_lightgbm -Wl,-R /usr/local/lib -o test
./test
Load model success!
Predict state: 0
Predict size: 1 , result: 0.870713
###########################
Predict state: 0
Predict size: 1 , result: 0.472528
Success!