Skip to main content

An intelligent feature selection library for Machine Learning

Project description

🌾 Winnow

Python Version License: MIT PRs Welcome Maintainability

The Intelligent Feature Selection Library for Machine Learning

Winnow is a high-performance, modular Python library designed to separate the signal from the noise in your data. It provides both classic statistical criteria and state-of-the-art selection techniques like BorutaSHAP and mRMR, all wrapped in a clean, developer-friendly API.


🎯 Why Winnow?

In data science, more data isn't always better. Irrelevant or redundant features can lead to overfitting, slow training times, and poor model interpretability. Winnow helps you "winnow the wheat from the chaff," leaving you with only the most impactful features.

✨ Key Features

  • ⚡ Base Selection: Correlation-based pruning, variance thresholding, and target relevancy.
  • 🧠 Advanced Techniques:
    • mRMR: Minimum Redundancy Maximum Relevance for diverse feature sets.
    • BorutaSHAP: Rigorous statistical selection using shadow features and SHAP values.
    • PCA Contribution: Filter features based on their influence on principal components.
  • 🛠️ Custom Logic: Easily register your own selection criteria into the pipeline.
  • 📊 Transparency: Comprehensive reporting of why each feature was kept or removed.

📦 Installation

pip install winnow-ml

🚀 Quick Start

Basic Selection

import pandas as pd
from winnow import BaseSelector

# Load your data
df = pd.read_csv("data.csv")

# Initialize and transform
selector = BaseSelector(correlation_threshold=0.85)
result = selector.fit_transform(df, target_column='target')

print(f"Selected features: {result.selected_features}")

Advanced Selection (Boruta + mRMR)

from winnow import AdvancedSelector

selector = AdvancedSelector(
    use_borutashap=True, 
    n_boruta_trials=20,
    use_mrmr=True,
    n_mrmr_features=10
)

result = selector.fit_transform(X, y)

📁 Project Structure

winnow/
├── winnow/               # Core source code
│   ├── base_selector.py  # Core selection logic
│   ├── advanced_selector.py # Boruta, mRMR, and PCA
│   └── logger.py         # Centralized logging
├── examples/             # Real-world usage examples
├── tests/                # Robust test suite
└── README.md

📄 License

Winnow is released under the MIT License.

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

winnow_ml-1.0.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

winnow_ml-1.0.1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file winnow_ml-1.0.1.tar.gz.

File metadata

  • Download URL: winnow_ml-1.0.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for winnow_ml-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dd986c5a5de4309dae7e0fcdff747f78dcddf9507d4c1db823f99fc41c77d436
MD5 c54c50824bb005b3bc942bc49fdc2feb
BLAKE2b-256 210a28cbeba361518670e99ec1f7b04932aece5266d5ae664e855fd12c0992d6

See more details on using hashes here.

File details

Details for the file winnow_ml-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: winnow_ml-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for winnow_ml-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0128e395483af5a7a8b85f803e043e51aec59ab61c6e6e2ec56f768b37013c6
MD5 a4ad1d646d8e008ef50b1ce1febd2e7f
BLAKE2b-256 3426d74abb0434a26a57bf544e0ca2284d1b7f83c846c03677aade12e08a8d35

See more details on using hashes here.

Supported by

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