README.md in xgb-0.1.1 vs README.md in xgb-0.1.2
- old
+ new
@@ -16,11 +16,11 @@
gem 'xgb'
```
## Getting Started
-This library follows the [Core Data Structure, Learning and Scikit-Learn APIs](https://xgboost.readthedocs.io/en/latest/python/python_api.html) of the Python library. Some methods and options are missing at the moment. PRs welcome!
+This library follows the [Python API](https://xgboost.readthedocs.io/en/latest/python/python_api.html). Some methods and options are missing at the moment. PRs welcome!
## Learning API
Train a model
@@ -31,11 +31,12 @@
```
Predict
```ruby
-booster.predict(x_test)
+dtest = Xgb::DMatrix.new(x_test)
+booster.predict(dtest)
```
Save the model to a file
```ruby
@@ -106,9 +107,15 @@
Get the importance of features
```ruby
model.feature_importances
+```
+
+Early stopping
+
+```ruby
+model.fit(x, y, eval_set: [[x_test, y_test]], early_stopping_rounds: 5)
```
## Data
Data can be an array of arrays