Install & Compatibility
Where this runs
tested against v0.2.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 19.8s · import 0.000s · 558MB
569MB installed
● package 569MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
BoostingRFA
✓ from shap_hypetune import BoostingRFA
✗ from shap_hypetune import RFA
RFA was added in v0.2.4 but the class is actually named BoostingRFA; importing just 'RFA' fails
BoostingRFE
✓ from shap_hypetune import BoostingRFE
✗ from shap_hypetune.rfe import BoostingRFE
Top-level import works; no submodule needed
BoostingRFECV
✓ from shap_hypetune import BoostingRFECV
BoostingSelector
✓ from shap_hypetune import BoostingSelector
✗ from shap_hypetune.selector import BoostingSelector
Top-level import is correct; submodule not directly exposed
Basic usage: perform recursive feature addition with hyperparameter tuning using LightGBM. Note: estimator can be 'lgbm', 'xgb', 'catboost', or 'rf' (Random Forest, added in v0.2.4).
import pandas as pd
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from shap_hypetune import BoostingRFA
X, y = make_classification(n_samples=100, n_features=20, random_state=0)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)
model = BoostingRFA(estimator='lgbm', n_iter=5, early_stopping_rounds=10, random_state=0)
model.fit(X_train, y_train)
print('Train accuracy:', model.score(X_train, y_train))
print('Selected features:', model.get_support())
Upgrade
Version history
0.2.7latest on PyPI · released Feb 21, 2024
Audit
Dependencies
numpyrequiredCore numerical dependency
pandasrequiredData structure for input features
scikit-learnrequiredBase estimator and compatibility
shaprequiredSHAP importance for feature selection
lightgbmoptionalOne of the supported gradient boosting engines
xgboostoptionalOne of the supported gradient boosting engines
catboostoptionalOne of the supported gradient boosting engines
hyperoptoptionalAlternative tuning method (used with hyperopt=True)