Feature Select PyPackage
Feature Select is a simple yet effective solution to select features from a numeric dataset, which yields the best results, given a Machine Learning algorithm.
GitHub repo: https://github.com/himanshu-dutta/featureselect/
Free software: MIT license
Features
Multiple optimization algorithms to work with.
Works with most class based Machine Learning models over a range of libraries.
Compatible with all platforms.
Quickstart
Install the latest Feature Select with
pip install featureselect
Usage
from featureselect import DEOptimizer, SAOptimizer, GAOptimizer, PSOptimizer
from sklearn.tree import DecisionTreeClassifier
import pandas as pd
# loading a dataset
dataset = pd.read_csv("dataset.csv", header=None)
dataset[34] = dataset[34].apply(lambda x: 1 if x == "g" else 0)
dataset = dataset.dropna()
X, y = dataset.iloc[:, :-1].to_numpy(), dataset.iloc[:, -1].to_numpy()
# best_accuracy, index_of_best_features = GAOptimizer((X, y), DecisionTreeClassifier, epochs = 10, threshold=0.6, verbose=1, max_depth=3)
# best_accuracy, index_of_best_features = SAOptimizer((X, y), DecisionTreeClassifier, epochs = 10, threshold=0.6, verbose=True, max_depth=3)
# best_accuracy, index_of_best_features = PSOptimizer((X, y), DecisionTreeClassifier, epochs = 10, verbose=1, max_depth=3)
best_accuracy, index_of_best_features = DEOptimizer((X, y), DecisionTreeClassifier, epochs = 10, threshold=0.6, verbose=1, max_depth=3)
#############
# Output
#############
Initial Accuracy: 0.887.
----------------------------------
* Epoch: 1 | Accuracy: 0.958.
----------------------------------
* Epoch: 2 | Accuracy: 0.958.
----------------------------------
* Epoch: 3 | Accuracy: 0.958.
----------------------------------
* Epoch: 4 | Accuracy: 0.958.
----------------------------------
* Epoch: 5 | Accuracy: 0.972.
----------------------------------
* Epoch: 6 | Accuracy: 0.972.
----------------------------------
* Epoch: 7 | Accuracy: 0.972.
----------------------------------
* Epoch: 8 | Accuracy: 0.972.
----------------------------------
* Epoch: 9 | Accuracy: 0.986.
----------------------------------
* Epoch: 10 | Accuracy: 0.986.
----------------------------------
(0.9859154929577465, array([ 2, 4, 5, 6, 9, 11, 12, 13, 14, 17, 19, 20, 21, 24, 26, 29, 32]))
Note
The project is still in developement phase and will be expanded and made better over time. Any contribution to it is welcomed. Stable release would be made available soon.
Metadata
Release files for featureselect 0.0.5
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 | |
|---|---|---|---|---|
| featureselect-0.0.5.tar.gz | 8.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| featureselect-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.8 kB
Release files / featureselect-0.0.5.tar.gz
| Download URL | featureselect-0.0.5.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc8f2034235fdcfef948aa51457be88df27f1e76cb48efb69b1e56105acb74d5
|
|
BLAKE2b-256 checksum How to use checksums |
2de47394c916d50b63e4ea04c0cbed1a88a50a7b10fbe89bd3e01343b0a52f2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
|
Release files / featureselect-0.0.5-py3-none-any.whl
| Download URL | featureselect-0.0.5-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fc28c649d0ead586024d2abd5998a981809004ec03e6032e5973ab35332f5a3
|
|
BLAKE2b-256 checksum How to use checksums |
b32abce27e088e5648d03d8be3f6e4c74b97de209fe2b74835d37baa57199a81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
|
Security for featureselect 0.0.5
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.