XGBoost and LightGBM Come to Ruby

Ruby and XGBoost

I’m happy to announce that XGBoost - and its 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)

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

Ruby logo is licensed under CC BY-SA 2.5.

You might also enjoy

Introducing pdscan: Scan Your Data Stores for Unencrypted Personal Data

Artistic Style Transfer in Ruby

Emotion Recognition in Ruby

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