cartoboost
Rust-backed spatial boosting for tabular modeling and forecasting.
What it is and what it does
CartoBoost extends gradient boosting to problems where spatial location, time cycles, route structure, or repeated identifiers carry predictive signal. It is designed for mobility, logistics, demand forecasting, and similar domains where a standard tabular booster is a baseline but the data has inherent structure—hour-of-day patterns, geographic neighborhoods, zone memberships, or directed flows—that a conventional tree cannot easily capture.
The library keeps a familiar scikit-learn-style estimator interface but makes modeling choices explicit: you define a feature schema that marks columns as periodic (e.g., hour-of-day with period 24), 2D spatial (diagonal or Gaussian), or sparse-set (list-valued zone or cell memberships), then fit a model that can split on these structured patterns. It also includes forecasting APIs for time series, graph regressors for network-structured data, and neural embedding models for high-cardinality IDs. The core runtime dependency is numpy; optional integrations (SHAP, H3, S2, DuckDB, Optuna, Polars, ONNX) are installed separately.
Use it for:
- Estimate trip duration or fare when hour-of-day and pickup location interact with distance and route context.
- Forecast demand by zone or corridor using rolling-origin backtests against naive and seasonal baselines.
- Rank routes or predict source-target flows where direction and spatial boundaries matter.
- Validate whether zone membership or H3/S2 cell structure improves predictions over axis-only splits.
- Build demand forecasts for geographic panels with rolling-origin validation and ensemble methods.
- Encode high-cardinality location or route IDs as learned embeddings to capture residual signal.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
CartoBoost is a Rust-backed gradient boosting library for regression, classification, and forecasting that incorporates spatial, temporal, and structured relationship patterns into tree-based models.
Yes, if your data has inherent spatial, temporal, or relationship structure and you want to test whether that structure improves over a standard booster baseline. The library is actively maintained, has no known vulnerabilities, and supports modern Python versions. Install friction is moderate but manageable via prebuilt wheels. Not recommended if place/time structure is irrelevant to your problem or if a simple interpretable model already answers your question.
Install
cartoboost on PyPI
pip
pip install cartoboostuv
uv add cartoboostpoetry
poetry add cartoboostInstalling cartoboost
Before you install
Medium install friction due to compiled wheels; however, prebuilt binaries are available for Python 3.10–3.14 across macOS (Intel and ARM), Linux (x86_64 and aarch64), and Windows (x86_64 and ARM). Active maintenance with a release within the last month.
License in practice
Permissive license allows commercial and private use without restriction; no copyleft obligations.
Quickstart
pip install cartoboost numpy
from cartoboost import CartoBoostRegressor
model = CartoBoostRegressor(
n_estimators=200,
learning_rate=0.04,
max_depth=5,
split_policy="structured",
)
model.fit(X_train, y_train)
predictions = model.predict(X_validation)
Requires Python 3.10 or later; compiled wheels available for common platforms (macOS, Linux, Windows on x86_64 and ARM).
Verify before relying
- Whether the package is production-ready despite Beta status or primarily for research workflows
- Performance characteristics compared to standard boosters on non-structured problems
- Community adoption and long-term maintenance commitment beyond the current active phase
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | actively maintained — 23 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 152,194/month — #10,908 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cartoboost-0.3.11-cp310-cp310-macosx_10_12_x86_64.whl; cartoboost-0.3.11-cp310-cp310-macosx_11_0_arm64.whl; cartoboost-0.3.11-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; cartoboost-0.3.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; cartoboost-0.3.11-cp310-cp310-win_amd64.whl; cartoboost-0.3.11-cp311-cp311-macosx_10_12_x86_64.whl; cartoboost-0.3.11-cp311-cp311-macosx_11_0_arm64.whl; cartoboost-0.3.11-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; cartoboost-0.3.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; cartoboost-0.3.11-cp311-cp311-win_amd64.whl; cartoboost-0.3.11-cp311-cp311-win_arm64.whl; cartoboost-0.3.11-cp312-cp312-macosx_10_12_x86_64.whl; cartoboost-0.3.11-cp312-cp312-macosx_11_0_arm64.whl; cartoboost-0.3.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; cartoboost-0.3.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; cartoboost-0.3.11-cp312-cp312-win_amd64.whl; cartoboost-0.3.11-cp312-cp312-win_arm64.whl; cartoboost-0.3.11-cp313-cp313-macosx_10_12_x86_64.whl; cartoboost-0.3.11-cp313-cp313-macosx_11_0_arm64.whl; cartoboost-0.3.11-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Keywords: boosting, gradient-boosting, machine-learning, python, rust
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
statsforecastStatsForecast provides fast implementations of…
permissive · top 5,000 on PyPI
hierarchicalforecastReconciles hierarchical time-series forecasts…
permissive · top 15,000 on PyPI
tbatsImplements BATS and TBATS exponential smoothing…
permissive · top 15,000 on PyPI
ngboostNGBoost implements Natural Gradient Boosting…
permissive · top 15,000 on PyPI
xgboost-cpuXGBoost CPU-only gradient boosting library for…
permissive · top 15,000 on PyPI
mlforecastmlforecast trains machine learning models on…
permissive · top 15,000 on PyPI
skforecastSkforecast is a Python library for time series…
permissive · top 15,000 on PyPI
geocifGenerates climatic impact drivers from Earth…
permissive · top 15,000 on PyPI
coreforecastProvides fast C++ implementations of…
permissive · top 5,000 on PyPI
prophetProphet forecasts time series data using an…
permissive · top 5,000 on PyPI