Scan your whole stack
From OX Research Newsroom
Are you using peshbeen?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.0.69
peshbeen was last scanned on 26 Nov 2026 at version 0.0.69. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.0.69 LATEST | 26 Nov 2026 | No rules fired |
| 0.0.67 | 12 Nov 2026 | No rules fired |
| 0.0.66 | 12 Nov 2026 | No rules fired |
| 0.0.65 | 12 Nov 2026 | Not shown |
| 0.0.64 | 10 Nov 2026 | Not shown |
Findings for v0.0.69. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.0.69; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
One forecasting workflow. Many models. From classical statistics to machine learning, regime-switching, and probabilistic scenarios — all behind the same
.fit(df)/.forecast(H)interface.
Peshbeen is a Python forecasting library built around a single idea: the forecasting workflow should be the same regardless of the model. The name draws from Kurdish — pesh (“front”) and been (“to see”) — combining to mean foresight.
Most forecasting libraries make you pick a lane: a classical-statistics toolkit, an ML-regressor framework, or a deep-learning stack — each with its own API, its own feature-engineering conventions, and its own way of handling trends and uncertainty. Peshbeen instead puts an unusually wide range of models behind one consistent interface, and bakes in the parts of a real forecasting workflow — feature engineering, trend handling, probabilistic scenarios, tuning, and model comparison — so switching models is a one-line change, not a rewrite.
It spans naive baselines, ETS, ARIMA, Auto ARIMA, Vector
Autoregression (VAR), scikit-learn regressors and gradient-boosted
trees (XGBoost, LightGBM, CatBoost), TabPFN tabular foundation
models, Generalized Linear Models (GLM) for count data,
Markov-switching regime models (MS-ARR and MS-VAR), and a built-in
weighted ensemble
(pesh)
— for univariate and multivariate series.
Peshbeen is designed for the messy middle of real-world forecasting — the projects where you need to try several very different model families, account for structural breaks and regime changes, model counts as well as continuous demand, and produce uncertainty you can actually feed into a decision. Its advantages:
🔁 Switch models without rewriting your code. A naive baseline, an
ARIMA, a LightGBM regressor, a VAR, and a Markov-switching model all
share the same .fit / .forecast / .cross_validate API. Comparing
them fairly is a one-line change, not a new pipeline.
🌀 Regime-switching, built in. First-class Markov-switching
autoregressive
(ms_arr)
and VAR
(ms_var)
models capture regime changes — crisis vs. baseline demand,
pre/post-intervention — that ARIMA and standard ML models smooth over.
These sit behind the same interface as every other model.
📈 A unified trend / stationarity pipeline across all model families. Differencing, a global linear trend, a local ETS trend, or piecewise-linear detrending with explicit change points is a single model argument — and it behaves identically whether you’re running ARIMA, a GLM, gradient boosting, or a regime-switching model. No rebuilding a transformer pipeline per model.
🔗 Multivariate forecasting with per-series control.
var
and
ms_var
accept a dictionary of lags (and transformations) per target
series, so each series can carry its own temporal structure while
you still model their interdependencies.
🎲 Probabilistic scenarios, not just intervals. Generate full sample paths for any model via residual calibration — empirical bootstrap, KDE, or a correlated (block) bootstrap that preserves dependence across horizons — ready to drop into capacity-planning or queueing simulations. Conformal prediction is available when you only need calibrated intervals.
🔢 Counts as a first-class case. A statsmodels-backed GLM with
a proper family (e.g. sm.families.Poisson(), Gamma) handles count
data — admissions, calls, demand — directly, with AIC/BIC/HQC
reported.
🧰 Batteries included. Automatic lag and rolling/expanding feature
generation, Box-Cox stabilisation, Optuna tuning, forward/backward
feature selection, a built-in metric-optimised ensemble
(pesh),
and ready-to-use datasets (including real healthcare operations
series).
A note on what powers it. Peshbeen combines native, dependency-free implementations — like its high-performance native ARIMA built on vectorized NumPy/SciPy digital filtering — with proven foundations like statsmodels for ETS/GLM. The value peshbeen adds is the unified workflow around them — plus genuinely original pieces like the Markov-switching models, the per-series multivariate specification, the shared change-point-aware detrending, and the
peshensemble.
The advantages above, in detail:
Unified API: Train any model using a simple .fit(df) and
.forecast(H) workflow, eliminating the need for manual
feature/target splitting.
Model Agnostic Across 14 Specialized Forecasters: Supports a
comprehensive spectrum of forecasting architectures under one unified
.fit / .forecast API:
naive,
ets,
arima,
auto_arima (stepwise automated order selection),
ml_forecaster
(recursive),
ml_direct_forecaster
(horizon-specific direct multi-step),
glm
(Poisson/Gamma count data), and
ms_arr
(Markov-switching autoregressive regime changes).ml_multi_output_forecaster,
var,
and
ms_var
for modeling simultaneous dynamical feedback and cross-series lag
interactions across wide DataFrames with multiple target columns.panel_forecaster
(scalable pooled global ML models across long panel series) and
ml_multi_forecaster
(pooled multi-series models with cross-series lag
interdependencies).pesh
(combines arbitrary member models with metric-optimized weights via
cross-validation).Automatic Feature Engineering: User can specify the key following parameters to automatically generate features:
lags: List of lag periods to create lag features.rolling_windows: List of window sizes for rolling statistics to
create rolling features (e.g., rolling mean, rolling std, rolling
quantiles).trend removal: Option to automatically difference the data or
de-trend it using global trend, local trend, or piecewise linear
trend. For piecewise linear trend, the user can specify the indexes
of the breakpoints. For local trend, the user can pass ETS
parameters to fit a local ETS model and use its fitted values as the
local trend.boxcox: Option to apply Box-Cox transformation to target variable
to stabilize variance.Multivariate & Multi-Series Forecasting: Built-in support for both wide multivariate systems and pooled multi-series panels:
ml_multi_output_forecaster,
var,
ms_var):
Expects wide DataFrames where columns share synchronous timestamps.
Directly models contemporaneous feedback and cross-variable lag
interactions between interacting series.panel_forecaster,
ml_multi_forecaster):
Expects long panel DataFrames (id_col, target_col).
panel_forecaster
pools data across hundreds or thousands of series to learn shared
dynamics without cross-series lag bloat;
ml_multi_forecaster
allows explicit cross-series lag dependencies.Probabilistic Forecasting: Enables probabilistic forecasting
through a simple two-step workflow. First, call calibrate with a
held-out portion (calibration data) of your dataset — peshbeen uses
the residuals at each horizon to fit the uncertainty model. Then call
sample to generate forecast scenarios and prediction intervals,
giving you a full picture of forecast uncertainty for risk assessment
and decision-making.
Four methods are implemented for generating probabilistic forecasts:
Empirical bootstrap: Resamples from the empirical distribution
of the residuals and adds the resampled residuals to the point
forecasts, building a distribution of possible future values
(method="empirical").
Kernel Density Estimation (KDE): Fits a smooth probability
density to the residuals and samples from it, which can capture
non-normal or heteroscedastic residual structure better than plain
resampling (method="kde").
Correlated (block) bootstrap: Resamples entire rows of residuals
(all horizons together), preserving the temporal dependencies and
correlations between forecast errors at different horizons for more
realistic scenarios (method="correlated").
Conformal prediction: Calculates nonconformity scores from the
residuals on a calibration set and uses them to construct prediction
intervals. This method produces intervals only (no scenario sample
paths), and is accessed via calibrate() + conformal_quantiles().
Hyperparameter Tuning & Feature Selection: Built-in hyperparameter tuning with Optuna, plus forward/backward feature selection, so you can optimise both model configuration and the feature set with minimal effort.
Built-in Ensemble
(pesh):
Combine any set of fitted models with equal weights, user-defined
weights, or weights optimised to minimise the metric you care
about via cross-validation.
Evaluation Metrics: A metrics module covering MAE, MSE, RMSE, MAPE, SMAPE, WMAPE and the scaled metrics MASE, RMSSE and SRMSE for fair model comparison.
Peshbeen is the right tool when you want to compare statistical, ML, and regime-switching models with the same code, when you suspect regime changes or structural breaks, when you’re forecasting counts, when your multivariate series need different lag structures, or when you need forecast scenarios for downstream simulation rather than just a point and an interval.
If your problem is dominated by deep-learning / foundation models, or by fitting thousands of series at maximum speed, mature specialised libraries (Darts, sktime, Nixtla) may serve you better — and peshbeen happily wraps the same proven engines where it makes sense. Peshbeen’s focus is coherence across a wide model span and coverage of an underserved middle, not out-scaling any single category.
Installation requires Python 3.10 or higher:
pip install peshbeen
from peshbeen.datasets import load_airline_passengers
from peshbeen.models import ml_forecaster
from peshbeen.transformations import rolling_mean, rolling_std
from lightgbm import LGBMRegressor
# Load clean monthly airline passenger data (1949 - 1960)
pax = load_airline_passengers()
train = pax[:-12]
test = pax[-12:]
# Automatic feature engineering: rolling statistics and seasonal lag structure
transforms = [rolling_mean(window_size=12, shift=1), rolling_std(window_size=12)]
# Machine learning forecaster with automated Box-Cox stabilization and linear detrending
model = ml_forecaster(
model=LGBMRegressor(verbose=-1, random_state=42),
target_col='passengers',
lags=12,
trend='linear',
box_cox=True,
lag_transform=transforms
)
model.fit(train)
forecasts = model.forecast(H=12)
import matplotlib.pyplot as plt
pax["passengers"].plot(figsize=(10, 5), label="Monthly Passengers", color="#1f77b4")
plt.title("Monthly International Airline Passengers (1949 - 1960)")
plt.xlabel("Date")
plt.ylabel("Thousands of Passengers")
plt.legend()
plt.show()
plt.figure(figsize=(10, 5))
plt.plot(train.index[-36:], train['passengers'][-36:], label='Train', color='#1f77b4')
plt.plot(test.index, test['passengers'], label='Test Actuals', color='black', linewidth=2)
plt.plot(test.index, forecasts, label='ML Forecast', color='#2ca02c', linestyle='--')
plt.title("Airline Passengers: 12-Month Out-of-Sample Forecast")
plt.xlabel("Date")
plt.ylabel("Thousands of Passengers")
plt.legend()
plt.show()
Sincere thanks to the Data Lab for Social Good research group at Cardiff University, UK, and its Director, Prof. Bahman Rostami-Tabar, for their support and encouragement during the development of this package.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.