Skip to main content
Open llms.txtCopy tools

CartoBoost Regressor

Use CartoBoostRegressor for numeric row-level targets when the effect of time, location, route membership, or other structure is part of the question. Typical uses include duration, fare, demand, or residual modeling.

Python Example

from cartoboost import CartoBoostRegressor

model = CartoBoostRegressor(
n_estimators=200,
learning_rate=0.04,
max_depth=5,
min_samples_leaf=20,
split_policy="structured",
)
model.fit(X_train, y_train)
pred = model.predict(X_test)

Browser WASM Example

CartoBoost regressor browser model

Runs runRegressionModel in Wasm with auto splitters and l2 loss.

Ready to run in this page.

Use When

NeedBetter first choice
Numeric row-level prediction.CartoBoostRegressor
Class probabilities or labels.CartoBoostClassifier
Query-local ordering.CartoBoostRanker
Time-indexed future values.Forecasting models

Common Controls

Scientific needParameter family
Dense tabular baselinesplit_policy="auto" or "axis_only"
Declared spatial/periodic/sparse structuresplit_policy="structured" plus feature_schema=
Sparse zones, routes, cells, or areassplit_policy="structured" plus sparse_sets=
Native categorical labels or ordered tiersFeatureKind.CATEGORICAL or FeatureKind.ORDINAL in feature_schema=
Smooth changes near boundariesfuzzy=True, fuzzy_bandwidth=..., fuzzy_kernel=...
Outlier-resistant regressionloss="mae", loss="huber", or loss="log_l2"
Conditional intervals or asymmetric service targetsloss="quantile", quantile_alpha=...
Local residual trend inside learned regionsleaf_predictor="linear", linear_leaf_features=[...]
Domain monotonicitymonotonic_constraints=[...]

Use Parameters, Feature Schema, Sparse Features, and Spatial Modeling for the contract details.

Validation

Report RMSE, MAE, and task-specific business metrics on the same split as the baselines. Use spatial, temporal, group, or cold-entity splits when those are the claim being tested.

Limitations

  • Structured splits help only when schema roles and units are correct.
  • Tree predictions do not extrapolate smooth trends beyond the observed feature range reliably.
  • High-cardinality identifiers need leakage-safe encoding or dedicated graph/neural handling.
  • Compare training and inference cost with strong tabular baselines on the same data.