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 -r requirements.txt

🚀 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.0.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.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: winnow_ml-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 1337b59a5ce0f3ca000171e6ffd9ab6e0d65f4c7d2690aad2ce1dfc72d859ee8
MD5 ce18989939fcb7b59df496c2e9b71d59
BLAKE2b-256 632dc6f74783cbc60a63f61c4f0fa687c10629e092918af5c67b440d128058fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: winnow_ml-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25c10ef5b5746df487085e83339e5196bdb72ab9f564c8ff876c78ac00dd34b7
MD5 7ddc38ed0431b9361556954629044818
BLAKE2b-256 420d11c50ab24e847120f782af033fee5e4ead7f953234d10a371bec58409785

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