Skip to content

Add XGBoost and LightGBM models #5

Description

@jeanclawd

Problem

"Why not XGBoost?" is the most predictable question users ask when they see a 49-model comparison tool that ships Gradient Boosting and HistGradientBoosting but skips the two industry-standard gradient-boosting libraries.

Proposal

Add XGBoost (`XGBRegressor`, `XGBClassifier`) and LightGBM (`LGBMRegressor`, `LGBMClassifier`) to the model registry. Both have Pyodide-compatible wheels on PyPI.

Implementation notes

  • Check current Pyodide-shipped wheels at the pinned version (`PYODIDE_VERSION` in `frontend/js/pyodide-bridge.js`). Add the missing ones to the `loadPackage` / `micropip.install` list.
  • Add entries to `AVAILABLE_MODELS` and `AVAILABLE_CLASSIFICATION_MODELS` in `frontend/py/learner.py` — same shape as existing models (key, display name, category, defaults).
  • Place under the existing Ensemble category, or introduce a Boosting subcategory.

Risks

  • Bundle size: XGBoost + LightGBM together can add ~20-30 MB to cold load.
  • Mitigation: lazy-load these wheels only when a user selects one of those models. Requires a minor change to `pyodide-bridge.js` to support post-init `loadPackage`.

Acceptance criteria

  • Both libraries selectable from the model list.
  • Training, CV, metrics, plots all work identically to existing models.
  • Cold-load time on first visit (without these models selected) is not regressed.
  • Export-to-joblib produces a file that loads in a standard Python env with `xgboost` / `lightgbm` installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions