Ensemble dataset generator for tabular data prediction and modeling projects.
Project description
EnsembleSet
EnsembleSet generates dataset ensembles by applying a randomized sequence of feature engineering methods to a randomized subset of input features.
1. Installation
Install the pre-release alpha from PyPI with:
pip install ensembleset
2. Usage
See the example usage notebook.
Initialize an EnsembleSet class instance, passing in the label name and training DataFrame. Optionally, include a test DataFrame and/or list of any string features and the path where you want EnsembleSet to put data. Then call the make_datasets() to generate an EnsembleSet, specifying:
- The number of individual datasets to generate.
- The fraction of features to randomly select for each feature engineering step.
- The number of feature engineering steps to run.
import ensembleset.dataset as ds
data_ensemble=ds.DataSet(
label='label_column_name', # Required
train_data=train_df, # Required
test_data=test_df, # Optional, defaults to None
string_features=['string_feature_column_names'], # Optional, defaults to None
data_directory='path/to/ensembleset/data' # Optional, defaults to ./data
)
data_ensemble.make_datasets(
n_datasets=10, # Required
fraction_features=0.1, # Required
n_steps=5 # Required
)
The above call to make_datasets() will generate 10 different datasets using a random sequence of 5 feature engineering techniques applied to a randomly selected 10% of features. The feature selection is re-calculated after each feature engineering step. Each feature engineering step is applied to the test set if one is provided with a minimum of data leakage (e.g. gaussian KDE is calculated from training data only and then applied to training and testing data).
By default, generated datasets will be saved to HDF5 in data/dataset.h5 using the following structure:
dataset.h5
├──train
│ ├── labels
| ├── 1
| ├── .
| ├── .
| ├── .
| └── n
│
└──test
├── labels
├── 1
├── .
├── .
├── .
└── n
3. Feature engineering
The currently implemented pool of feature engineering methods are:
- One-hot encoding for string features
- Ordinal encoding for string features
- Log features with bases 2, e or 10
- Ratio features
- Exponential features with base 2 or e
- Sum features with 2, 3, or 4
- Difference features with 2, 3 or 4 subtrahends
- Polynomial features with degree 2 or 3
- Spline features with degree 2, 3 or 4
- Quantized features with using randomly selected k-bins
- Smoothed features with gaussian kernel density estimation
Major feature engineering parameters are also randomly selected for each step.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ensembleset-1.0a22.tar.gz.
File metadata
- Download URL: ensembleset-1.0a22.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8faf8097325bcd012beb0a1847637b25eeb8b45cef19649b3e908d943633e7d
|
|
| MD5 |
50fc927b0c75909c52c9d5f18ca33a6b
|
|
| BLAKE2b-256 |
ca7b22f5dd4899d7762f98af197ce3ff9c50d01cfa505cae6ad734ce43d67b24
|
Provenance
The following attestation bundles were made for ensembleset-1.0a22.tar.gz:
Publisher:
publish-to-pypi.yml on gperdrizet/ensembleset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ensembleset-1.0a22.tar.gz -
Subject digest:
a8faf8097325bcd012beb0a1847637b25eeb8b45cef19649b3e908d943633e7d - Sigstore transparency entry: 736878661
- Sigstore integration time:
-
Permalink:
gperdrizet/ensembleset@c66d13ba86eafc21727ee1cce09891e8d2c5484d -
Branch / Tag:
refs/tags/v1.0-alpha.22 - Owner: https://github.com/gperdrizet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@c66d13ba86eafc21727ee1cce09891e8d2c5484d -
Trigger Event:
release
-
Statement type:
File details
Details for the file ensembleset-1.0a22-py3-none-any.whl.
File metadata
- Download URL: ensembleset-1.0a22-py3-none-any.whl
- Upload date:
- Size: 28.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f55597a07aaad6e9cf42bc98354743f3694cc08c61d7f460c9f238df1c2b15d7
|
|
| MD5 |
0e8e003089b5f7b249537e58a2bedbe8
|
|
| BLAKE2b-256 |
707a66e0de1c6218e2ede8c939caf1e9cb6645482bc0eb1d71ee201620151b6e
|
Provenance
The following attestation bundles were made for ensembleset-1.0a22-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on gperdrizet/ensembleset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ensembleset-1.0a22-py3-none-any.whl -
Subject digest:
f55597a07aaad6e9cf42bc98354743f3694cc08c61d7f460c9f238df1c2b15d7 - Sigstore transparency entry: 736878672
- Sigstore integration time:
-
Permalink:
gperdrizet/ensembleset@c66d13ba86eafc21727ee1cce09891e8d2c5484d -
Branch / Tag:
refs/tags/v1.0-alpha.22 - Owner: https://github.com/gperdrizet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@c66d13ba86eafc21727ee1cce09891e8d2c5484d -
Trigger Event:
release
-
Statement type: