@fractal-solutions/xgboost-js

1.0.0 • Public • Published

@fractal-solutions/xgboost-js

A pure JavaScript implementation of XGBoost for both Node.js and browser environments.

Installation

npm install @fractal-solutions/xgboost-js

Usage

const { XGBoost } = require('@fractal-solutions/xgboost-js');

// Initialize the model
const model = new XGBoost({
    learningRate: 0.3,
    maxDepth: 4,
    minChildWeight: 1,
    numRounds: 100
});

// Train the model
model.fit(X_train, y_train);

// Make predictions
const predictions = model.predictBatch(X_test);

Features

  • Binary classification
  • Model serialization
  • Feature importance calculation
  • Comprehensive test suite
  • Pure JavaScript implementation
  • Works in both Node.js and browser environments

Documentation

For full documentation, see docs/xgboost.md

License

MIT © Fractal Solutions

Package Sidebar

Install

npm i @fractal-solutions/xgboost-js

Weekly Downloads

5

Version

1.0.0

License

MIT

Unpacked Size

27.3 kB

Total Files

6

Last publish

Collaborators

  • fractal-solutions