Skip to main content

LightGBM/XGBoost interface which tunes n_estimator by splitting data, then refit with entire data

Project description

gbm_autosplit

GBM scikit-learn interfaces which performs "early stopping" with single data set during fit.

"Early stopping" is great practice to tune the number of estimators for gradient boosting models. However it is not difficult to use it in tuning module in scikit-learn such as RandomizedSearchCV / GridSearchCV because to use early stopping module requires two data sets but scikit learn does not have such interface.

To solve this situation, this interface performs following steps with in fit.

  1. Split original input data into two randomly
  2. Estimate n_estimators by using split data set with early stopping
  3. Perform fit by using entire data set with estimated n_estimators

Install

pip install gbm_autosplit

Usage

import gbm_autosplit

estimator = gbm_autosplit.LGBMClassifier()
estimator.fit(x, y)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gbm_autosplit-0.0.12.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gbm_autosplit-0.0.12-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file gbm_autosplit-0.0.12.tar.gz.

File metadata

  • Download URL: gbm_autosplit-0.0.12.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for gbm_autosplit-0.0.12.tar.gz
Algorithm Hash digest
SHA256 80b5519acf20685549ad439f57cad5488c121344fb228d37e200c1f693c2b789
MD5 ab01eecaaf279a2dbe8507b6147a5779
BLAKE2b-256 bb0724d7a17a0ea7cecc7e966cf8b60b7c1b9a1370b30c6098ce1b6eff94ea27

See more details on using hashes here.

File details

Details for the file gbm_autosplit-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: gbm_autosplit-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for gbm_autosplit-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 a3ee5234a584fbc4ce2c5407269081bd0e26a80106d484e92dec4fc4eb6c755d
MD5 b734a72560cf44690f80df6592ed835b
BLAKE2b-256 db28dea423efe85741599f3d90c8d9247047371ce74127b5098663b1b45056a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page