XGBoost and LightGBM Come to Ruby

Ruby and XGBoost

Ruby logo is licensed under CC BY-SA 2.5

I’m happy to announce that XGBoost - and it’s cousin LightGBM from Microsoft - are now available for Ruby!

XGBoost and LightGBM are powerful machine learning libraries that use a technique called gradient boosting. Gradient boosting performs well on a large range of datasets and is common among winning solutions in ML competitions.

XGBoost and LightGBM are already available for popular ML languages like Python and R. The Ruby gems follow similar interfaces and use the same C APIs under the hood.

Make predictions with as little code as:

model = Xgb::Regressor.new
model.fit(x_train, y_train)
model.predict(x_test)

While Ruby still lags behind other languages for machine learning, the ecosystem is getting better. Rumale is under active development and supports a large number of algorithms with an interface similar to Scikit-Learn. There’s also Daru which is similar to Pandas. The addition of gradient boosting covers another key category.

Check out the Xgb and LightGBM gems today!

Published August 19, 2019 · Tweet


You might also enjoy

Artistic Style Transfer in Ruby

Learn Data Science

Introducing Searchkick Pro


All code examples are public domain.
Use them however you’d like (licensed under CC0).