Skip to main content

Forecast containers, evaluation metrics, and cross-validation for time series

Project description

forecastbox

Forecast containers, evaluation metrics, and cross-validation for time series.

Installation

pip install -e ".[dev]"

Quick Start

import numpy as np
import pandas as pd
from forecastbox import Forecast
from forecastbox.metrics import mae, rmse
from forecastbox.datasets import load_dataset

# Create a forecast
fc = Forecast(
    point=np.array([100.5, 101.2, 102.0]),
    index=pd.date_range('2024-01', periods=3, freq='MS'),
    model_name='MyModel',
    horizon=3
)

# Evaluate
actual = np.array([100.8, 100.9, 103.1])
print(f"MAE: {mae(actual, fc.point):.2f}")
print(f"RMSE: {rmse(actual, fc.point):.2f}")

# Load dataset
data = load_dataset('macro_brazil')
print(data['ipca'].head())

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forecastbox-0.1.0.tar.gz (224.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

forecastbox-0.1.0-py3-none-any.whl (281.1 kB view details)

Uploaded Python 3

File details

Details for the file forecastbox-0.1.0.tar.gz.

File metadata

  • Download URL: forecastbox-0.1.0.tar.gz
  • Upload date:
  • Size: 224.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for forecastbox-0.1.0.tar.gz
Algorithm Hash digest
SHA256 be07b01fcdfe30665cc3cf226c14568c400a8fdd3a5d095cbfc12d6f0223e9c5
MD5 d501bb5cb9fb4e71e9bbfbf4d09ae414
BLAKE2b-256 4f65e1e7d72a018b7d52befc02e8c8415c63c9c22e7a7b83d9bfd24eef6a21b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for forecastbox-0.1.0.tar.gz:

Publisher: publish.yml on ForecastBox-CrossValidation/forecastbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file forecastbox-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: forecastbox-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 281.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for forecastbox-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10a7e87ffc3bcb04b597b0d2fe57d91c8925e81ed0898964fcccb87068115968
MD5 94862aeeb47e874d1a6d3597b20943dd
BLAKE2b-256 5afac994d6390bb32703db5e2ebdf9f23dad82a9b4efccd09833a8fd37cf9784

See more details on using hashes here.

Provenance

The following attestation bundles were made for forecastbox-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ForecastBox-CrossValidation/forecastbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page