--- id: cartoboost version: "0.3.11" license: unclear license_treatment: permissive maintenance: active --- # cartoboost — Rust-backed spatial boosting for tabular modeling and forecasting. License: permissive · Maintenance: active · Downloads: 152.2K/mo ## 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 above — 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 pip install cartoboost uv add cartoboost 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_current - Install friction: medium - Maintenance: active - Downloads: 152.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags spatial gradient boosting, temporal-spatial machine learning, structured prediction with trees, demand forecasting with location, geographic regression models, route and zone-aware boosting, time-series forecasting with structure, spatial-temporal-ml, structured-prediction, demand-forecasting [View on SkillFed](https://skillfed.io/packages/cartoboost) · [View on PyPI](https://pypi.org/project/cartoboost/)