Skip to main content

No project description provided

Project description

Python Version License

peshbeen

peshbeen is a easy-to-use Python library designed for time series forecasting. It provides a simple and intuitive interface for building, training, and evaluating forecasting models. It automatically handles data preprocessing specific to time series data, making it easier for users to focus on model development and evaluation. Peshbeen supports a variety of forecasting models, including traditional statistical models and modern machine learning approaches, including Linear Regression, Random Forest, XGBoost, LightGBM, CatBoost, and Cubist.

Why peshbeen

  • Automated Detrending Engine: Seamlessly handles non-stationary data using global linear trends, piecewise linear regression (for structural breaks), or ETS (Exponential Smoothing) to capture evolving trend dynamics.

  • Broad Model Support: Out-of-the-box compatibility with the leading tree-based and boosting architectures, including XGBoost, LightGBM, CatBoost, Random Forest, and AdaBoost.

  • Intelligent Optimization: Leverages Bayesian Optimization (Hyperopt) to not only tune machine learning hyperparameters but also to optimize smoothing parameters for ETS detrending.

  • Uncertainty Quantification: Goes beyond simple point forecasts with a suite of probabilistic approaches:

    • Empirical Distributions: Leveraged via boosting.

    • KDE (Kernel Density Estimation): For non-parametric forecast distribution modeling.

    • Correlated Error Modeling: Accounting for error dependencies across the forecast horizon.

    • Conformal Prediction: Distribution-free uncertainty estimates.

Install in Development mode

# make sure  package is installed in development mode
$ pip install -e .

# make changes under nbs/ directory
# ...

# compile to have changes apply to 
$ nbdev_prepare

Installation

Install latest from the GitHub [repository][repo]:

$ pip install git+https://github.com//.git

or from [conda][conda]

$ conda install -c  

or from [pypi][pypi]

$ pip install 

[repo]: [docs]: https://.github.io// [pypi]: https://pypi.org/project// [conda]: https://anaconda.org//

Documentation

Documentation can be found hosted on this GitHub [repository][repo]’s [pages][docs]. Additionally you can find package manager specific guidelines on [conda][conda] and [pypi][pypi] respectively.

[repo]: [docs]: https://.github.io// [pypi]: https://pypi.org/project// [conda]: https://anaconda.org//

How to use

Fill me in please! Don’t forget code examples:

1+1
2

Models

API details

Peshbeen is …

from peshbeen.metrics import RMSE, MAE
MAE([3, -0.5, 2, 7], [2.5, 0.0, 2, 8])
np.float64(0.5)
from peshbeen.datasets import load_nhs_attend
# split the data into train and test sets
train = load_nhs_attend[:-30]
test = load_nhs_attend[-30:]
from peshbeen.models import ml_forecaster
# import linear regression from sklearn
from sklearn.linear_model import LinearRegression
ml_linear = ml_forecaster(model=LinearRegression(),
              target_col='attend', lags = 7)
ml_linear.fit(train)
ml_linear.forecast(H=30)
array([430796.7041251 , 428410.43400966, 426821.4107408 , 425222.28238429,
       424326.81261509, 423662.41365795, 423223.09618412, 422821.17942991,
       422415.76664768, 422068.11922156, 421747.36540958, 421464.13994277,
       421222.63819927, 421020.25542666, 420849.47190517, 420702.43079703,
       420576.84362351, 420469.04045579, 420375.80944133, 420295.35317043,
       420226.20137003, 420166.84067688, 420115.81185478, 420071.98653527,
       420034.37835101, 420002.07038525, 419974.29777864, 419950.43050693,
       419929.92365245, 419912.30021165])
# plot the forecast against the actual values
import matplotlib.pyplot as plt
plt.figure(figsize=(10, 6))
plt.plot(train.index, train['attend'], label='Train')
plt.plot(test.index, test['attend'], label='Test')
plt.plot(test.index, ml_linear.forecast(H=30), label='Forecast')
plt.legend()
plt.show()

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

peshbeen-0.0.1.tar.gz (70.1 kB view details)

Uploaded Source

Built Distribution

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

peshbeen-0.0.1-py3-none-any.whl (72.6 kB view details)

Uploaded Python 3

File details

Details for the file peshbeen-0.0.1.tar.gz.

File metadata

  • Download URL: peshbeen-0.0.1.tar.gz
  • Upload date:
  • Size: 70.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for peshbeen-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e79938ff07ce792d11fa362e1e58b322cc97e24932bdbcc68651855d942b95c0
MD5 fb35b3df6b574c900707d0e7e9179bc3
BLAKE2b-256 a5b6003c109652913ed1bf24e648dc1ad1189cd83d7bc1bf351ac43625768571

See more details on using hashes here.

File details

Details for the file peshbeen-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: peshbeen-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 72.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for peshbeen-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 00825745c23728c48152b26368603d3daee37a8793d57fb1330f4086d5b76bb5
MD5 5c0754ed1e49436dc91d46b103ad4bb6
BLAKE2b-256 f713b52bad1f7426c5ad717f369b05320ec8d0258b51d9f249714f86bdcbc415

See more details on using hashes here.

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