XGBoost-Node
eXtreme Gradient Boosting Package in Node.js
XGBoost-Node is a Node.js interface of XGBoost. XGBoost is a library from DMLC. It is designed and optimized for boosted trees. The underlying algorithm of XGBoost is an extension of the classic gbm algorithm. With multi-threads and regularization, XGBoost is able to utilize more computational power and get a more accurate prediction.
The package is made to run existing XGBoost model with Node.js easily.
Features
-
Runs XGBoost Model and make predictions in Node.js.
-
Both dense and sparse matrix input are supported, and missing value is handled.
-
Supports Linux, macOS.
Install
Install from npm
npm install xgboost
Install from GitHub
git clone --recursive git@github.com:nuanio/xgboost-node.gitnpm install
Documentation
Roadmap
- Matrix API
- Model API
- Prediction API
- Async API
- Windows Support
- Training API
- Visualization API
Examples
Train a XGBoost model and save to a file, more in doc.
Load the model with XGBoost-Node:
const xgboost = ;const model = xgboost; const input = 51 35 14 02 // class 0 66 3 44 14 // class 1 59 3 51 18 // class 2; const mat = input 3 4;console;// {// value: [// 0.991, 0.005, 0.004, // class 0// 0.004, 0.990, 0.006, // class 1// 0.005, 0.035, 0.960, // class 2// ],// error: undefined, // no error// } const errModel = xgboost;console;console;
Contributing
Your help and contribution is very valuable. Welcome to submit issue and pull requests. Learn more