FELITS: Feature Engineering and Large-scale Integration for Time Series
FELITS is an open-source Python library for end-to-end time series analysis and forecasting, with a focus on Short-Term Load Forecasting (STLF). It provides a complete pipeline: signal cleaning, feature engineering, feature selection, predictive modelling, and explainable AI (XAI).
The library is the result of the INIC01-6 research project (CONACYT, Paraguay) and was used to produce the methodology for a published research article.
Highlights
- Preprocessing — outlier detection (IQR, Hampel/MAD, 3-sigma), STL decomposition, dual-scaler pattern
- Feature extraction — cyclic encodings, lag/shift features, rolling statistics, FFT, wavelets, tsfresh, FATS-style
- Feature selection — Granger causality, KSG mutual information, mRMR, Adaptive LASSO, RF/XGB importance
- Models — XGBoost, RandomForest, LinearRegression, plus
tf.kerasRNN models (LSTM/GRU/BiLSTM/BiGRU) and Bahdanau attention variants - XAI — LIME, SHAP, and Deep SHAP as a closed-loop meta-optimizer for feature elimination
- Optuna hyperparameter optimization with multi-objective TPE sampler
- Pure pandas — built end-to-end on top of pandas, NumPy and scikit-learn
Requirements
- Python ≥3.11, <3.14 (TensorFlow requires ≤3.13)
- uv (recommended) or pip
Installation
git clone https://github.com/felits/felits.git
cd felits
# Create venv and install with uv (recommended)
uv venv --python 3.13
uv pip install -e ".[all,dev]"
Extra dependency groups
| Extra | Includes |
|---|---|
[dl] |
TensorFlow for RNN/Attention models |
[xgb] |
XGBoost |
[wavelet] |
PyWavelets |
[duckdb] |
DuckDB for SQL-style batch feature engineering |
[all] |
Everything above |
Python version management
uv handles Python downloads automatically. To switch Python versions:
uv python install 3.13 # download Python 3.13
uv venv --python 3.13 .venv # create a venv with it
Quickstart
import pandas as pd
from felits.preprocessing import HampelFilter, TimeSeriesScaler
from felits.feature_extraction import cyclical_encode, rolling_statistics
from felits.feature_selection import FeatureSelector
from felits.models import XGBoostForecaster
from felits import Metrics
df = pd.read_csv("demand.csv", parse_dates=["timestamp"], index_col="timestamp")
df["value_clean"] = HampelFilter(window_size=24).transform(df["value"])
df = cyclical_encode(df)
df = rolling_statistics(df, columns=["value_clean"], windows=[24, 168], stats=["mean", "std"])
model = XGBoostForecaster(n_estimators=500, max_depth=6)
model.fit(X_train, y_train)
preds = model.predict(X_test)
m = Metrics(y_test, preds)
print(m.dict_metrics())
Project layout
felits/
├── preprocessing/ # outliers, decomposition, scaling, imputation, metrics
├── feature_extraction/ # temporal, spectral, automated
├── feature_selection/ # causal, information, regularization, ensemble, xai
├── models/ # base, sklearn, dl (separate modules)
│ ├── base.py # _SklearnForecaster, TF detection
│ ├── sklearn.py # XGBoost/RF/Linear wrappers
│ └── dl.py # RNN/Attention models (requires TF)
├── optimization.py # Optuna wrappers
├── xai.py # LIME, SHAP, deep SHAP closed-loop
└── data.py # loaders and synthetic data
examples/ # Runnable .py example scripts
notebooks/ # Jupyter notebooks for each example
tests/ # pytest suite (79+ tests)
Citation
If you use FELITS in academic work, please cite the associated research article (see research-docs/).
License
MIT — see LICENSE.
Metadata
Release files for felits 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| felits-0.3.0.tar.gz | 37.7 kB | Without provenance | Details for felits-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| felits-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for felits-0.3.0-py3-none-any.whl |
Total release size: 86.0 kB
Release files / felits-0.3.0.tar.gz
| Download URL | felits-0.3.0.tar.gz |
|---|---|
| Size | 37.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3395687d36aeb4cc7fd6fc033270cbb660cd1c3efa966fcf57f28371a70678eb
|
|
BLAKE2b-256 checksum How to use checksums |
50cb4913241fe49a4c7e5edddba03df6d8ed17f00c33d0e21f48d9c1a50a80b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / felits-0.3.0-py3-none-any.whl
| Download URL | felits-0.3.0-py3-none-any.whl |
|---|---|
| Size | 48.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c4330a5ada542bdbae3a2a4b8d1589d142e43a1c6dae9b8921d386dcbd51504
|
|
BLAKE2b-256 checksum How to use checksums |
d644d023b4043a5acbcb317a65028adf31fb0dc4f351e481a62d12832e2a0c6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for felits 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.