E2E-FS
E2E-FS: An End-to-End Feature Selection Method for Neural Networks
CONTACT
This project is hosted at https://github.com/braisCB/E2E-FS.
REFERENCE
If you plan to use this code, please cite the following paper:
Cancela, B., Bolón-Canedo, V., & Alonso-Betanzos, A. (2020). E2E-FS: An End-to-End Feature Selection Method for Neural Networks. IEEE Transactions on Pattern Analysis and Machine Intelligence. (Pending on publication)
EXAMPLE OF USE (for colon dataset)
from dataset_reader import colon
import numpy as np
import e2efs
n_features_to_select = 10
if __name__ == '__main__':
## LOAD DATA
dataset = colon.load_dataset()
raw_data = np.asarray(dataset['raw']['data'])
raw_label = np.asarray(dataset['raw']['label']).reshape(-1)
train_data = raw_data[:int(len(raw_data) * 0.8)]
train_label = raw_label[:int(len(raw_label) * 0.8)]
test_data = raw_data[int(len(raw_data) * 0.8):]
test_label = raw_label[int(len(raw_label) * 0.8):]
normalize = colon.Normalize()
train_data = normalize.fit_transform(train_data)
test_data = normalize.transform(test_data)
## LOAD E2EFSSoft model
model = e2efs.E2EFSSoft(n_features_to_select=n_features_to_select)
## OPTIONAL: Load E2EFS Model
# model = e2efs.E2EFS(n_features_to_select=n_features_to_select)
## OPTIONAL: Load E2EFSRanking Model
# model = e2efs.E2EFSRanking()
## FIT THE SELECTION
model.fit(train_data, train_label, validation_data=(test_data, test_label), batch_size=2, max_epochs=2000)
## FINETUNE THE MODEL
model.fine_tune(train_data, train_label, validation_data=(test_data, test_label), batch_size=2, max_epochs=100)
## GET THE MODEL RESULTS
metrics = model.evaluate(test_data, test_label)
print(metrics)
## GET THE MASK
mask = model.get_mask()
print('MASK:', mask)
## GET THE RANKING
ranking = model.get_ranking()
print('RANKING:', ranking)
Metadata
Release files for e2efs 1.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 |
|---|---|---|---|---|
| e2efs-1.0.1.tar.gz | 32.0 kB | Without provenance | Details for e2efs-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| e2efs-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for e2efs-1.0.1-py3-none-any.whl |
Total release size: 66.5 kB
Release files / e2efs-1.0.1.tar.gz
| Download URL | e2efs-1.0.1.tar.gz |
|---|---|
| Size | 32.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fda6ad7d1b7d02cf73d6d5c6ea9e5bbd7e47a2c6990f0ebaf71e0ae777812380
|
|
BLAKE2b-256 checksum How to use checksums |
1e949c58868390958ecde5d324a2221d2e5b5d2373a774ec6b4db4b4ee79a0ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.14
|
Release files / e2efs-1.0.1-py3-none-any.whl
| Download URL | e2efs-1.0.1-py3-none-any.whl |
|---|---|
| Size | 34.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bfe2779fbf8a3bc40f80a48ffd7a7c08a061f9716e8a3762b40dee51a2ccbd8b
|
|
BLAKE2b-256 checksum How to use checksums |
fa0130445223e94e4043643f2c63f154572294769b83dbba8b59be253012fd21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.14
|
Security for e2efs 1.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.