Featransform: Automated Feature Engineering Framework for Supervised Machine Learning
Framework Contextualization
The Featransform project constitutes an objective and modern proposition to automate feature engineering framework through the integration of various approachs of input pattern recognition known in Machine Learning such as dimensionality reduction, anomaly detection, clustering approaches and datetime feature constrution. Built with advanced design patterns and a modular architecture, it seamlessly orchestrates multiple feature engineering techniques including anomaly detection, clustering, dimensionality reduction, and temporal feature extraction—all optimized through intelligent validation-driven feature selection.
In order to avoid generation of noisy data for predictive consumption, after the engineered features ensemble are concatenated with the original features, a validation-driven wrapper feature selection is implemented: features are ranked by tree-ensemble importance (CatBoost and XGBoost), progressively larger top-ranked subsets are evaluated on a held-out validation split, and only the best-scoring subset is kept, maintaining only valuable columns available for future models performance improvement purposes.
The architecture design includes three main sections, these being: data preprocessing, diverse feature engineering ensembles and optimized feature selection validation.
This project aims at providing the following application capabilities:
-
General applicability on tabular datasets: The developed feature engineering procedures are applicable on any data table associated with any Supervised ML scopes, based on input data columns to be built up on.
-
Improvement of predictive results: The application of the
Featransformaims at improve the predictive performance of future applied Machine Learning models through added feature construction, increased pattern recognition and optimization of existing input features. -
Continuous integration: After the train data is fitted, the created object can be saved and implemented in future data with the same structure.
Main Development Tools
Major frameworks used to built this project:
Where to get it
Binary installer for the latest released version is available at the Python Package Index (PyPI).
GitHub Project Link: https://github.com/TsLu1s/Featransform
Installation
To install this package from Pypi repository run the following command:
pip install featransform
Usage Example
Featransform - Automated Feature Engineering Pipeline
In order to be able to apply the automated feature engineering featransform pipeline you need first to import the package.
The following needed step is to load a dataset and define your to be predicted target column name into the variable target.
You can customize the pipeline by selecting from preset configurations (minimal, standard, optimized, complete) and specifying the task type (regression, binary_classification, multiclass_classification).
import pandas as pd
from sklearn.model_selection import train_test_split
from featransform.pipeline import Featransform
from featransform.configs.baseline import FTconfig
from featransform.utils.serializer import PipelineSerializer
from featransform.utils.data_generator import make_dataset
import warnings
warnings.filterwarnings("ignore", category=Warning)
# Generate a sample dataset — for demonstration only.
# When using Featransform for real, swap this for your own data (X) and target (y).
X, y = make_dataset(task='multiclass_classification', n_samples=5000, complexity='medium', n_classes=3)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# Create pipeline with preset configuration
config = FTconfig.complete(task_type="multiclass_classification")
# Available presets: minimal(), standard(), optimized(), complete()
# Task types: "regression", "binary_classification", "multiclass_classification"
pipeline = Featransform(config)
# Fit and transform
pipeline.fit(X_train, y_train)
X_train_transformed = pipeline.transform(X_train)
X_test_transformed = pipeline.transform(X_test)
# View optimization results
pipeline.report_optimization()
# Save & Load Pipeline
serializer = PipelineSerializer()
serializer.save(pipeline, 'fitted_pipeline.pkl')
loaded_pipeline = serializer.load('fitted_pipeline.pkl')
X_loaded_transform = loaded_pipeline.transform(X_test)
Usage Examples
Further automated and customizable feature engineering applications:
- Baseline Example - Get started with intuitive preset configurations, synthetic dataset generation, and clear pipeline serialization for production deployment
- Advanced Configuration - Build fully customized pipelines from scratch with complete control over preprocessing strategies, feature engineering components, and optimization parameters
- Component Testing - Deeper dive into individual components with comprehensive train-test evaluation across encoding, imputation, anomaly detection, clustering, and dimensionality reduction methods
Prefer interactive notebooks? Check out the notebook examples with step-by-step execution.
Core Capabilities
Feature Engineering Methods:
- Anomaly Detection (Isolation Forest, LOF, One-Class SVM, Elliptic Envelope)
- Clustering (KMeans, MiniBatchKMeans, Birch, DBSCAN, Gaussian Mixture)
- Dimensionality Reduction (PCA, SVD, FastICA)
- Temporal Features (Cyclic encoding, datetime decomposition)
Intelligent Processing:
- Advanced Imputation (Mean, Median, Most Frequent, Constant, Iterative, KNN)
- Categorical Encoding (Label)
- Scaling of the feature-engineering input (Standard, Robust, MinMax)
- Identifier-column handling (explicit list or auto-detection)
- Automated Feature Selection (Importance-based, validated on a holdout)
@software{featransform2023,
author = {Luis Fernando Santos},
title = {Featransform: Automated Feature Engineering Framework for Supervised Machine Learning},
year = {2023},
publisher = {PyPI},
url = {https://pypi.org/project/featransform/}
}
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Metadata
Release files for featransform 2.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| featransform-2.4.0-py3-none-any.whl | Python 3 | none | any | Details for featransform-2.4.0-py3-none-any.whl |
Release files / featransform-2.4.0-py3-none-any.whl
| Download URL | featransform-2.4.0-py3-none-any.whl |
|---|---|
| Size | 60.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5fc18217877dd505e556169f8da6634a601a0888ca0c03638659496fd52138c0
|
|
BLAKE2b-256 checksum How to use checksums |
105ebfc0fe0b4bab57feb16e6e3c8b55de541245dc8fd6d6503f3b25c1cedc78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.18
|
Security for featransform 2.4.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.