A package for feature selection using Subsampling Winner Algorithm
Project description
subsamp Feature Selection with Subsampling Winner Algorithm
Subsampling Winner Algorithm (SWA)
SubsampWinner is a Python package that implements the Subsampling Winner Algorithm (SWA) for feature selection in high-dimensional datasets. It includes a robust double assurance procedure to enhance stability and reliability in feature selection.
Features
- Subsampling Winner Algorithm (SWA) for efficient feature selection;
- Double Assurance procedure for improved stability;
- Support for both homoskedastic and heteroskedastic data;
- Parallel processing capabilities for improved performance;
- Flexible parameter tuning and multiple testing correction methods.
Installation
You can install SubsampWinner using pip:
pip install subsamp
Quick Start
import numpy as np
from subsamp import subsamp, SubsampDoubleAssurance
from GenerateData import generate_heteroskedastic_data
# Generate sample data
n, p = 100, 80
beta0 = np.array([0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5])
beta0_index = np.arange(len(beta0))
beta = np.zeros(p)
beta[beta0_index] = beta0
gamma = np.zeros(p)
X, y, _, _ = generate_heteroskedastic_data(n, p, hetero_func=lambda x: 3,
beta=beta, gamma=gamma, type='diagonal')
# Initialize and run SWA
swa = subsamp(s=20, m=1000, qnum=15)
swa.fit(X, y)
print("Selected features:", swa.finalists)
# Run Double Assurance procedure
sda = SubsampDoubleAssurance(m=1000)
results = sda.double_assurance(X, y, s0=26, T=0.9, I_max=20, init_range=0.3, r=0.75)
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
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 subsampwinner-0.0.1.tar.gz.
File metadata
- Download URL: subsampwinner-0.0.1.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
258b71168ae74baa5db4752c561259a251e5d5bab1be7e9c0556aeb0fccc42df
|
|
| MD5 |
ea7c374afc474dfc89b42049ed2a2a61
|
|
| BLAKE2b-256 |
6473577c12e412802297ccd2f7fccae20d024a8de20b0a35f96c575bc9f5faa6
|
File details
Details for the file subsampwinner-0.0.1-py3-none-any.whl.
File metadata
- Download URL: subsampwinner-0.0.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cba31e50ec29601d01e96c337dad5d8b28e995e1d72e003f1ac4dc606239b8a
|
|
| MD5 |
4fc9fa8c0b03f8ef7bb7609fcad8195a
|
|
| BLAKE2b-256 |
acb7f8b55a9009519b60837037f74498d775bfea098a45b0fd826a5500633a65
|