skillfed

cartoboost

Rust-backed spatial boosting for tabular modeling and forecasting.

cartoboost v0.3.11 152.2K downloads/30d#10,908 on PyPI4
Permissive license Active released

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 cartoboost

uv

uv add cartoboost

poetry

poetry add cartoboost

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: RustTopic :: Scientific/Engineering :: Artificial Intelligence

Tags

spatial gradient boostingtemporal-spatial machine learningstructured prediction with treesdemand forecasting with locationgeographic regression modelsroute and zone-aware boostingtime-series forecasting with structure
spatial-temporal-mlstructured-predictiondemand-forecasting

More Artificial Intelligence packages