Skip to content

Releases

0.3.0

Choose a tag to compare

@rafapras rafapras released this 27 Nov 01:32
4590f8e

Highlights

  • Faster Interleaved Tree Models at scale: fused L1-resident column-major Numba kernel (best_leaf_cuts_T) and single-pass logistic gradient computation in node_hist_margin (bit-for-bit identical predictions; fits 1.00M × 31 rows in ~5.3 s and 1.66M × 11 rows in ~4.4 s on 4 cores at 16 cuts).
  • Native categorical splits: CategoricalInterleavedTreeClassifier (alias CategoricalFIGSClassifier), automatically dispatched by BudgetClassifier(max_splits=b, categorical_features="auto") on DataFrames with categorical/string columns (purely numeric inputs stay bit-for-bit identical):
    • Fisher-optimal Newton ratio ordering with rare-in-leaf pooling (min_cat_weight) and Rissanen MDL subset complexity regularization (cat_dof_penalty).
    • Separate missing (NaN) vs other / unseen category codes so unseen test-time categories route to the majority side of each split.
    • Automatic min_cat_coverage guardrail keeping near-unique strings/ISO-8601 timestamps chronologically ordered via leak-free searchsorted binning and exact SQL string comparisons.
    • Optional max_subset_size cap for bounded, compact categorical rules.
  • SQL & scikit-learn fixes: to_sql() defaults to null_safe=True, supports custom score_col/proba_col, zero-tree edge cases, and categorical + timestamp SQL; FastDecisionTreeClassifierCV adds the allow_nan tag and sklearn delegation (predict_log_proba, get_depth, get_n_leaves, feature_importances_); RashomonFIGSClassifier uses leaf-order-invariant structural deduplication (_forest_key).
  • Experimental & Lab: new families in bettertrees.experimental (HingeFIGSClassifier, CausalFIGS, BudgetRegressor/FIGSRegressor/SumOfOptimalTreesRegressor, rashomon_mcr) and research archive in bettertrees.lab (LookaheadFIGSClassifier, CompactTreeBoosterV2, L2FIGSClassifier, SparseTreeSumClassifier, ResidualRatioFIGSClassifier).
  • Docs & Examples: new examples/05_categorical_and_sql.ipynb notebook and stacked 38-dataset benchmark report in docs/BENCHMARKS.md.

0.2.0

Choose a tag to compare

@rafapras rafapras released this 16 Oct 02:00
bc8dcc7
  • as_tree_sum(model, X): one entry point that reads LightGBM, XGBoost, CatBoost and
    scikit-learn tree models (HistGradientBoostingClassifier, GradientBoostingClassifier,
    DecisionTreeClassifier) as a bettertrees sum with the same raw score (tested for
    equality), so the whole interpretation API applies to them. Cuts that send missing
    values right are refused when the feature has missing values in X; categorical
    splits are refused.
  • Scorecard views on every sum: segments(X) (the data marked tree by tree: the rule of
    each leaf and its points), profiles(X) (best, modal, median and worst client, observed
    or the feasible extremes found by branch and bound, plus any clients chosen with
    rows=), plot_profiles(X), plot_trees() and plot_growth() (the order of the cuts:
    the ITM records it while growing as growth_; boosters grow one tree after another).
    plot_trees(x) writes the client's value next to every cut on its path. Every plot
    starts from the base, adds one leaf per tree in the same units and says in a legend line
    what each mark means. Points in the credit convention (offset, pdo) or raw logit;
    bad chooses the class the score counts against and bad_label names it in the plots
    (e.g. "default").
  • New example notebook 04_scorecard_views.

0.1.0

Choose a tag to compare

@rafapras rafapras released this 08 Oct 22:24
c7ae70c

First Version, implements the main methods from the paper in a mostly usable state