Skip to main content

SmallGBM

Gradient boosting with Bayesian leaf regularization for small data.

version python license pip DOI


Why SmallGBM?

XGBoost and LightGBM are built for scale. They shine on thousands of rows. But when you only have 50, 100, or 500 samples, their default hyperparameters fail — overfitting, instability, unpredictable results.

SmallGBM is designed from the ground up for datasets with fewer than 1000 samples, using Bayesian leaf weight regularization to prevent overfitting on small leaves.

Feature SmallGBM XGBoost LightGBM
Bayesian leaf weights
Uncertainty estimates
No bootstrap (uses all data)
Stable under label noise
scikit-learn compatible

Research

SmallGBM has been evaluated on 16 datasets (synthetic and real-world) with sample sizes from 20 to 1000. Key findings:

  • Noise stability: At 20% label noise, SmallGBM outperforms XGBoost and LightGBM
  • Prior insensitivity: Performance is nearly invariant to sigma_prior across three orders of magnitude
  • Predictable learning curve: Reliable performance begins at n ≈ 40

Noise stability comparison

At 20% label noise, SmallGBM is the best performer. Bayesian regularization keeps it stable when others collapse.


Installation

pip install smallgbm

Quickstart

from smallgbm import SmallGBMClassifier

model = SmallGBMClassifier()
model.fit(X_train, y_train)
proba = model.predict_proba(X_test)

API

SmallGBMClassifier

Parameter Default Description
n_estimators 50 Number of boosting rounds
max_depth 3 Maximum tree depth
min_samples_leaf 3 Minimum samples per leaf
learning_rate 0.1 Shrinkage factor
sigma_prior 0.5 Bayesian prior strength
random_state None Random seed for reproducibility
auto_scale False Apply RobustScaler internally

SmallGBMRegressor

Same parameters, for regression tasks.

from smallgbm import SmallGBMRegressor

model = SmallGBMRegressor()
model.fit(X_train, y_train)
preds = model.predict(X_test)

Citation

@software{emelyanov2026smallgbm,
  author = {Emelyanov, Ilya},
  title = {SmallGBM: Gradient Boosting with Bayesian Leaf Regularization for Small-Sample Tabular Data},
  year = {2026},
  doi = {10.5281/zenodo.21905013},
  url = {https://github.com/nsdmlk/SmallGBM}
}

License

MIT © Emelyanov Ilya 2026


Built with ❤️ for the small data community

Download files

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

Source Distribution

smallgbm-1.2.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

smallgbm-1.2.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file smallgbm-1.2.0.tar.gz.

File metadata

  • Download URL: smallgbm-1.2.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.15.0a5

File hashes

Hashes for smallgbm-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b01a0e49bce7612eac2b026a19c10227549bb17f7c36e2807942af4d90301946
MD5 5256321e1bbafc75e522c32fa3a8d056
BLAKE2b-256 784f3a25b0e69ee4d273179f405b86acdd2ec8c58aa622d3184318ef5ba2292b

See more details on using hashes here.

File details

Details for the file smallgbm-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: smallgbm-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.15.0a5

File hashes

Hashes for smallgbm-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ed0c336d7c8bd49adf05c0857fae565e22aba3f30a0419231b17ae3f35d7551
MD5 bc2a22522f959d2e4e999d901ff5a864
BLAKE2b-256 e1fca6a4da84ba869e28323971d9e05c39e24bb8cedd10e9b4f4cf57e9838069

See more details on using hashes here.

Release history Release notifications | RSS feed

1.4.1

2 files

1.4.0

2 files

1.3.0

2 files

This release

1.2.0 This release

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

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