README.md in lightgbm-0.1.4 vs README.md in lightgbm-0.1.5

- old
+ new

@@ -6,41 +6,52 @@ [![Build Status](https://travis-ci.org/ankane/lightgbm.svg?branch=master)](https://travis-ci.org/ankane/lightgbm) ## Installation -First, [install LightGBM](https://lightgbm.readthedocs.io/en/latest/Installation-Guide.html). On Mac, copy `lib_lightgbm.so` to `/usr/local/lib`. - Add this line to your application’s Gemfile: ```ruby gem 'lightgbm' ``` +LightGBM is packaged with the gem, so no need to install it separately. On Mac, also run: + +```sh +brew install libomp +``` + ## Getting Started This library follows the [Python API](https://lightgbm.readthedocs.io/en/latest/Python-API.html). A few differences are: -- The `get_` prefix is removed from methods +- The `get_` and `set_` prefixes are removed from methods - The default verbosity is `-1` - With the `cv` method, `stratified` is set to `false` Some methods and options are also missing at the moment. PRs welcome! ## Training API +Prep your data + +```ruby +x = [[1, 2], [3, 4], [5, 6], [7, 8]] +y = [1, 2, 3, 4] +``` + Train a model ```ruby params = {objective: "regression"} -train_set = LightGBM::Dataset.new(x_train, label: y_train) +train_set = LightGBM::Dataset.new(x, label: y) booster = LightGBM.train(params, train_set) ``` Predict ```ruby -booster.predict(x_test) +booster.predict(x) ``` Save the model to a file ```ruby