1from hyperopt_gbt import HyperOptGradientBoostedClassifier
2
3clf = HyperOptGradientBoostedClassifier(
4 n_estimators=100,
5 learning_rate=0.1,
6 max_depth=6,
7 use_goss=True, # LightGBM: gradient-based sampling
8 binning='quantile_sketch', # XGBoost: adaptive bin boundaries
9 n_bins=255,
10)
11
12clf.fit(X_train, y_train)
13proba = clf.predict_proba(X_test)
1# From source
2pip install -e .
3
4# With benchmark dependencies
5pip install -e ".[benchmark]"
6
7# Build Rust backend (optional, for maximum speed)
8cd rust_gbt && pip install maturin && maturin develop --release
1HyperOptGradientBoostedClassifier(
2 # Core
3 n_estimators=100, # Number of boosting rounds
4 learning_rate=0.1, # Shrinkage
5 max_depth=6, # Maximum tree depth
6
7 # Accuracy innovations
8 ordered_boosting=False, # CatBoost: unbiased boosting
9 ordered_ts=True, # CatBoost: ordered target statistics
10 oblivious_trees=False, # CatBoost: balanced trees
11
12 # Speed innovations
13 use_goss=True, # LightGBM: gradient sampling
14 goss_a=0.2, # Keep top 20% by gradient magnitude
15 goss_b=0.1, # Sample 10% from rest
16 n_bins=255, # Histogram bins
17 binning='uniform', # 'uniform' or 'quantile_sketch'
18
19 # Regularization
20 l2_reg=1.0, # L2 on leaf weights
21 min_child_weight=1.0, # Min hessian sum in leaf
22 subsample=1.0, # Row subsampling
23 colsample_bytree=1.0, # Column subsampling
24)
1HyperOptGradientBoostedRegressor(
2 # Same parameters as classifier
3)
1from hyperopt_gbt import compile_inference_engine
2
3engine = compile_inference_engine(model, engine_type='auto')
4# Options: 'naive', 'flat', 'simd', 'quickscorer', 'auto'
5
6predictions = engine.predict(X_binned)
1import rust_gbt
2
3model = rust_gbt.PyRustGBT()
4model.fit(X_train, y_train,
5 n_estimators=50, learning_rate=0.1, max_depth=6,
6 use_goss=True, goss_a=0.2, goss_b=0.1,
7 binning="quantile", task="classification")
8
9proba = model.predict_proba(X_test)
See
ARCHITECTURE.md for the full technical design.
See
RESULTS.md for detailed benchmark results.