ffselect
Fast feature subset selection library
This algorithm performs feature subset selection in O(n log n) or O(n) time
It may be useful for eliminating polynomial features with n equal to hundreds or thousands, where regular subset selection algorithms cannot perform in adequate time.
Usage
from ffselect.subset import MinSubsetSelection, FastSubsetSelection
MinSubsetSelection(data, target, fit_function, features, loss=True, interactive=True)
"""
Minimal feature subset selection algorithm
data: Input data to pass to the fitting function
target: Target parameter feature name
fit_function: Callable function that fits the model and returns R^2/loss
features: List of feature names
loss: Set to true (by default) if the fitting function returns loss, R^2 otherwise
interactive: Print output (default True)
return: Tuple with the resulting R^2/loss and the list of features
"""
def FastSubsetSelection(data, target, fit_function, features, threshold = None, loss = True, interactive = True):
"""
Fast feature subset selection algorithm in linear time. May drop important features
data: Input data to pass to the fitting function
target: Target parameter feature name
fit_function: Callable function that fits the model and returns R^2/loss
features: List of feature names
threshold: Minimal difference in loss/R^2 at which we drop the feature
loss: Set to true (by default) if the fitting function returns loss, R^2 otherwise
interactive: Print output (default True)
return: Tuple with the resulting R^2/loss and the list of features
"""
Please view subset.ipynb for the complete example
Installation
pip3 install ffselect
Metadata
Release files for ffselect 0.0.1
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 |
|---|---|---|---|---|
| ffselect-0.0.1.tar.gz | 40.1 kB | Without provenance | Details for ffselect-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ffselect-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for ffselect-0.0.1-py3-none-any.whl |
Total release size: 68.3 kB
Release files / ffselect-0.0.1.tar.gz
| Download URL | ffselect-0.0.1.tar.gz |
|---|---|
| Size | 40.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5cdc8c51c763730b311ff190ef233e27ec4918da7e9004e12f83a448baf9a3d
|
|
BLAKE2b-256 checksum How to use checksums |
20812cf240975a73102b1b061332c1cecc76655988077d39dcf1aac1b18b760b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / ffselect-0.0.1-py3-none-any.whl
| Download URL | ffselect-0.0.1-py3-none-any.whl |
|---|---|
| Size | 28.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
945ba3064af3840be145594fd11203f67f3023657877c3e540bbc084ee5f67c0
|
|
BLAKE2b-256 checksum How to use checksums |
35d9370c8713e46c7a448d9c431ee6c813890a17e93828c2594f8183960ba54a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for ffselect 0.0.1
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.