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.3.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.3.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smallgbm-1.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 1ce90801305e39ebbc755f20a451bdc073af00f70afdcf9c0a3dfc0528435336
MD5 fb3ef01326205917a9cf10bc6c99926b
BLAKE2b-256 172d8a970d67f0414795f992bebcebd0cb8079f3ac139f0a46f6b6c686bf5908

See more details on using hashes here.

File details

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

File metadata

  • Download URL: smallgbm-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bce21511ee566586a9fea950c16a0baab101cf152aaae56c871a0431d4bc0ea3
MD5 4a596cbc8d14b966ebf84e05b03b4dce
BLAKE2b-256 9b5fa7a687a122b62473d00ddf6d03f8fef4090ac20b5ffaa008e9b6e886d6b5

See more details on using hashes here.

Release history Release notifications | RSS feed

1.4.1

2 files

1.4.0

2 files

This release

1.3.0 This release

2 files

1.2.0

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