Skip to main content
Open llms.txtCopy tools

CartoBoost Classifier

Use CartoBoostClassifier for binary or multiclass labels when the decision boundary may depend on time, location, route membership, or sparse signals. It fits binary logistic loss for two classes and multiclass logistic loss for three or more classes.

Python Example

from cartoboost import CartoBoostClassifier

clf = CartoBoostClassifier(
n_estimators=200,
learning_rate=0.04,
max_depth=4,
min_samples_leaf=20,
split_policy="structured",
class_weight="balanced",
)
clf.fit(X_train, binary_label)
prob_positive = clf.predict_proba(X_test)[:, list(clf.classes_).index(1)]

Browser WASM Example

The browser bundle currently exposes the shared boosted-tree runner through runRegressionModel. Use this example to inspect the same splitter, loss, and visualization path in WASM; use the Python classifier API above for class-label training and probability calibration.

Boosted tree browser classifier analog

Runs runRegressionModel in Wasm with auto splitters and log_l2 loss.

Ready to run in this page.

Use When

NeedBetter first choice
Binary or multiclass labels.CartoBoostClassifier
Numeric target values.CartoBoostRegressor
Ordered candidates within query groups.CartoBoostRanker
Calibrated uncertainty intervals.Probabilistic and conformal models

Validation

Report CartoBoost classifier quality with logloss plus threshold-free metrics such as ROC-AUC or PR-AUC when the positive class is rare. Compare against dummy and standard tabular baselines on the same split.

For workflow and method details, see Python API Reference.

Limitations

  • Probability calibration must be checked on held-out rows.
  • Rare classes need enough examples in every training and evaluation split.
  • Spatial or temporal structure is used only when declared in the feature schema.