Skip to main content
Open llms.txtCopy tools

CartoBoost Feature Catalog

This page summarizes CartoBoost feature surfaces and the modeling reasons to use them. Detailed API contracts live in the linked topic pages and in the Python API reference.

Choose features by the effect you need to measure:

  • dense numeric features for scalar facts such as distance, fare components, coordinates, and recent counts;
  • periodic features for cyclic time such as hour of day or day of week;
  • sparse sets for rows that belong to several zones, cells, hierarchies, or route memberships;
  • graph features when relationships among zones, routes, and time buckets are the signal;
  • neural embeddings when stable high-cardinality IDs carry repeated residual behavior;
  • SHAP explanations when you need an additive audit of how fitted features contributed to predictions.

CartoBoost Regressor

cartoboost.CartoBoostRegressor is the main sklearn-style estimator for tabular, temporal, spatial, and sparse-set regression.

FeaturePublic surfaceModeling use
L2 regressionloss="l2" or "squared_error"Mean-oriented fare, duration, or demand targets.
L1 regressionloss="l1", "mae", or "absolute_error"Robust median-like fits with constant leaves.
Huber regressionloss="huber", huber_delta=...Robust squared-error compromise with constant leaves.
Log-L2 regressionloss="log_l2", log_offset=1.0Positive skewed targets such as fare or duration.
Quantile regressionloss="quantile" or "pinball", quantile_alpha=...Conditional quantiles for risk analysis.
Constant leavesleaf_predictor="constant"Default tree leaf behavior.
Linear leavesleaf_predictor="linear", linear_leaf_features=[...]Local linear residual trends inside tree regions.
Sample weightsfit(..., sample_weight=...)Weighted studies, rebalancing, or survey-style emphasis.
Monotonic and interaction constraintsmonotonic_constraints=[-1, 0, 1, ...]Enforce known directional effects and allowed branch-level feature families in supported fits.
Additive valuespredict_additive_values(...)Per-tree additive contributions whose row sum matches prediction.
sklearn compatibilityget_params, set_params, clone, Pipeline, GridSearchCVStandard estimator workflows.
TensorBoard loggingtensorboard_log_dir=...Optional scalar training curves; install tensorboardX.
Artifactssave, load, save_weights, load_weightsVersioned model and weights artifacts.
ONNX export subsetsave_weights(path, format="onnx")Requires onnx; dense axis-tree subset only.

See Python API Reference, Parameters, Objectives, Constraints, and Model Artifacts.

CartoBoost Classifier And Ranker

cartoboost.CartoBoostClassifier and cartoboost.CartoBoostRanker extend the same tree modeling structure to discrete labels and grouped relevance labels.

FeaturePublic surfaceModeling use
Binary classificationCartoBoostClassifier(objective="binary_logloss")Airport-trip flags, high-delay labels, or route-risk labels.
Multiclass classificationCartoBoostClassifier(objective="multiclass_logloss")Multi-bucket demand, delay, or service class labels.
Class weightsclass_weight="balanced" or label-weight dictReweight rare classes in native gradient updates.
Probability outputspredict_proba, decision_functionCalibration, threshold-free metrics, and ranking by class risk.
Grouped rankingCartoBoostRanker(objective="lambdarank")Candidate dropoff zones, route alternatives, or service actions within a query.
Pairwise rankingobjective="pairwise_logit"Pairwise relevance optimization without NDCG weighting.
Ranking metricsscore_groups, ndcg_at_k, mean_average_precision, mean_reciprocal_rankQuery-group evaluation with NDCG, MAP, and MRR.
TensorBoard loggingtensorboard_log_dir=...Optional training scalar curves for classifier logloss and ranker NDCG/MAP/MRR.

See CartoBoost Classifier, CartoBoost Ranker, and Python API Reference.

Native Categorical Features

CartoBoost regressor, classifier, and ranker wrappers can encode categorical columns while preserving the mapping in saved artifacts.

FeaturePublic surfaceModeling use
Nominal categorical columnspandas category/string/object or FeatureKind.CATEGORICALPickup/dropoff zones, boroughs, service tiers, or route labels.
Ordinal categorical columnsFeatureKind.ORDINALOrdered service classes or ranked operational bins.
Low-cardinality encodingStable one-hot or subset partition indicatorsTransparent treatment of small category sets.
High-cardinality encodingSmoothed target-statistic columnCompact repeated-ID signal with an unknown-category value.
Artifact persistencesave / load wrapper artifactsPrediction-time category mappings remain stable after loading.

See Categorical Features and Feature Schema.

Splitters And Feature Semantics

Splitters tell the model what geometry or data shape is meaningful.

SplitterPublic namesModeling use
Automaticsplit_policy="auto"Conservative default search.
AxisaxisStandard one-feature thresholds.
Histogram axisaxis_histogram, axis_hist, histogram, axis_histogram:<bins>Faster dense numeric threshold search.
Diagonal 2Ddiagonal_2d, diagonal2dOblique route or coordinate boundaries.
Gaussian/radial 2Dgaussian_2d, gaussian2d, radialLocal hotspots, airports, depots, corridors, or neighborhood effects.
Periodicperiodic_time, periodic_24, periodic:<period>Wraparound hour, weekday, or seasonal phase.
Sparse setsparse_set, sparseList-valued zone, route, grid, H3, or S2 memberships.
Fuzzy routingfuzzy=True, fuzzy_bandwidth=..., fuzzy_kernel=...Fractional routing near split boundaries.

FeatureSchema records dense numeric, categorical, ordinal, periodic, sparse-set, H3 sparse-set, and S2 sparse-set roles so saved artifacts and prediction inputs can be validated.

See Feature Schema, Sparse Features, and Spatial Modeling.

Data Inputs And Optional Dependencies

Optional integrations stay optional. Helpers that require an optional package raise a clear install error when the dependency is missing.

CapabilityPublic surfaceDependency
NumPy-style dense arraysfit(X, y), predict(X)Core package.
pandas/dataframe-style inputsDataframe columns in estimator and forecasting helpersInstall pandas.
DuckDB relation inputsDense relation/query-result supportInstall duckdb.
Polars inputsDataframe support where documentedInstall polars.
H3 encodinglatlng_to_h3_id, encode_h3_cells, build_h3_sparse_sets, encode_h3_route_cells, build_h3_route_sparse_sets, h3_parent_id, normalize_h3_idInstall h3; point and decoded-route encoding, validation, ID normalization, scaffold expansion, and row assembly.
S2 encodinglatlng_to_s2_id, encode_s2_cells, build_s2_sparse_sets, encode_s2_route_cells, build_s2_route_sparse_sets, s2_parent_id, normalize_s2_idInstall s2sphere; point and decoded-route encoding, validation, ID normalization, and row assembly.
Geographic sparse helpersbuild_geo_sparse_sets, build_zip_sparse_sets, coerce_geo_to_feature_id, coerce_zip_to_feature_idCore package.
SHAP explanationsmake_shap_explainer, explain_shapInstall shap.
Optuna workflowsTuning examples/workflowsInstall optuna.

See Installation, Sparse Features, and SHAP Support.

CartoBoost Neural Embedding Models And Features

Neural embeddings are for stable, high-cardinality IDs that carry residual signal, such as pickup zones, dropoff zones, OD pairs, or zone-hour buckets. They are not the same claim as cold-zone generalization; report the split.

FeaturePublic surfaceNotes
Standalone supervised ID modelNeuralEmbeddingStandaloneRegressorDirect regressor over learned ID embeddings plus optional dense features.
Hybrid neural featuresNeuralEmbeddingRegressorLearns ID vectors and appends them to a tabular model.
Neural feature blocksNeuralEmbeddingFeaturesDeterministic feature-generation helper.
Fallback behaviorArtifactFallback and fallback argumentsHandles unseen or rare IDs through configured fallback vectors/chains.
Benchmark helperbenchmark_neural_vs_cartoboostQuick held-out comparison between structured and neural-enhanced models.
Artifactssave, load on standalone modelsPersist learned embedding model state.

See CartoBoost Neural Embedding Models And Features.

CartoBoost Graph Models And Features

Graph support is available both as direct standalone modeling and as optional feature generation for another estimator. Use it when zone, route, or temporal relationships are part of the model, especially directed pickup-dropoff effects.

FeaturePublic surfaceNotes
Node2Vec encoderNode2VecEncoder, Node2VecFeatureEncoder, Node2VecConfig, AliasSampler, RandomWalkGenerator, Node2VecTrainer, EdgeEmbeddingModel, EmbeddingFeatureTransformerDirected/weighted random-walk embeddings with p/q transition bias, alias sampling, deterministic Rayon-backed seeded walks, skip-gram training, and edge-row embedding features.
GraphSAGE encoderGraphSageEncoder, GraphSageFeatureEncoder, GraphSageConfigHomogeneous graph embeddings with node attributes.
HeteroGraphSAGE encoderHeteroGraphSageEncoder, HeteroGraphSageFeatureEncoder, HeteroGraphSageConfigTyped-edge graph embeddings.
HinSAGE encoderHinSageEncoder, HinSageFeatureEncoder, HinSageConfigTyped-node and typed-relation graph surface with schema validation.
Feature transformerGraphFeatureTransformer, GraphFeatureBundleProduces dense graph columns and optional sparse sets for another model.
Graph schemasGraphSchema, EdgeType, DirectionalityConfig, DirectedMetaPath, TemporalEdgeValidates directed heterogeneous graph contracts.
Graph buildersHomogeneousGraph, HeterogeneousGraph, SourceTargetPairNodes, materialize_source_target_pair_nodesNormalizes topology and preserves source-target pair identity.
Walk generatorsMetaPathWalkGenerator, TemporalWalkGenerator, SignedEdgeSamplerDirected, temporal, and signed walk utilities.
CartoBoost graph regressorsNode2VecStandaloneRegressor, GraphSageStandaloneRegressor, HeteroGraphSageStandaloneRegressor, HinSageStandaloneRegressorDirect graph regression without a boosted wrapper.
CartoBoost link predictorsNode2VecLinkPredictor, GraphSageLinkPredictor, HeteroGraphSageLinkPredictor, HinSageLinkPredictorLink scoring plus reports.
Link metricsbinary_auc, binary_average_precision, top_k_metrics, mean_reciprocal_rank, link_prediction_reportRanking and binary link-prediction diagnostics.
Directional featuresDirectionalFeature, DirectionalityConfigPreserves source -> target semantics and reverse-flow contrasts.
Graph regularization and rulesCsrGraph, GraphLaplacian, GraphSmoother, GraphRegularizedBooster, GraphSplitRegularization, GraphLeafSmoothing, SymbolicRelationSet, RuleCompiler, MonotoneConstraintSet, InteractionConstraintSetSupplied sparse graphs, symbolic relation penalties, row-graph split scoring, graph-smoothed constant leaves, deterministic rule features, and split constraint checks for smoothing residuals, leaf values, and graph-aware predictions.

See CartoBoost Graph Models And Features.

CartoBoost General Utilities, Evaluation, And Forecasting

General utilities include single-series forecasts, Kalman filters, intermittent-demand methods, sequence reference utilities, and ordinary kriging. Kalman support includes frame-based local-level, local-linear, and self-tuning forecasters plus diagnostic filter utilities. Sequence utilities cover known-prefix continuation, reference-axis path inference, group-level OOF candidate row generation, OOF leakage checks, per-group error summaries, and aligned candidate blending. Evaluation helpers include out-of-time, temporal blocked, spatial blocked, spatial buffered, environmental blocked, spatial grouped, and grouped blocked splits; pinball loss; logloss; ROC-AUC; PR-AUC; Brier score; ECE calibration error; NDCG; MAP; MRR; interval diagnostics; CUSUM and Page-Hinkley regime signals; EWMA volatility; regime interval policies; rolling median and MAD residuals; leakage-safe Kalman residual state correction; residual Moran's I; spatial CV gap; jitter volatility; and conformal residual helpers.

Forecasting classes validate data, train models, run rolling-origin backtests, compute metrics, and preserve artifacts. The Prophet-style piecewise linear seasonal model also supports external trend multipliers and recent residual shock propagation for market-belief adjustments.

See General Utilities, Forecasting, and the forecasting model guides.

Source-checkout Command Line Interfaces

Command groupPublic surfaceNotes
Regression CLI`cargo run -p cartoboost-cli -- trainpredict
Forecasting scriptspython scripts/forecast.py ...Forecasting workflows from a source checkout.

The Python wheel is the supported distribution path. Use Python for sparse-set, graph-derived, and custom forecasting workflows that need richer in-memory objects.

See CLI Reference and Forecasting.

CartoBoost Quality And Benchmark Reporting

Benchmark claims should name the dataset, target, split, feature set, metric, model settings, and whether data is synthetic, generated acceptance data, or real benchmark data. For graph and neural features, keep standalone-model claims separate from feature-generation claims.