Skip to main content

Library to generate toy data for machine learning experiments in the context of all-relevant feature selection.

Project description

All Relevant Feature Selection Generator Library (ARFS-Gen)

PyPI PyPI - Python Version PyPI - License

This repository contains a python library to generate synthetic (toy) data for use in research papers when evaluating all relevant feature selection e.g. used in fri.

It allows creating datasets with a specified number of strongly and weakly relevant features as well as random noise features.

In the newest revision it also includes methods which generate data with privileged information.

It works by utilizing existing methods from numpy and scikit-learn.


The library is available on PyPi. Install via pip:

pip install arfs_gen

or clone this repository and use:

pip install .


In the following we generate a simple regression data set with a mix of strongly and weakly relevant features:

    # Import relevant method
    from arfs_gen import genRegressionData
    # Import model
    from sklearn.svm import LinearSVR

    # Specify parameters
    n = 100
    # Features
    strRel = 2
    strWeak = 2
    # Overall number of features (Rest will be filled by random features)
    d = 10

    # Generate the data
    X, y = genRegressionData(
    # Fit a model
    linsvr = LinearSVR(), y)


For dependency management we use the newly released poetry tool.

If you have poetry installed, use

$ poetry install

inside the project folder to create a new venv and to install all dependencies. To enter the newly created venv use

$ poetry env

to open a new shell inside. Or alternatively run commands inside the venv with poetry run ....


Test it by running poetry run pytest.

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

arfs_gen-1.1.2.tar.gz (10.6 kB view hashes)

Uploaded source

Built Distribution

arfs_gen-1.1.2-py3-none-any.whl (11.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page