Skip to main content

End-to-end interpretable binary-classification pipeline

Project description

crystal-ml

An end-to-end interpretable binary‐classification pipeline.
crystal-ml provides configurable data ingestion, model training (SVM, Balanced Random Forest, XGBoost, AutoGluon),
SVM‐based downsampling algorithm, supervised discretization (FCCA), and optimal decision‐tree induction (GOSDT).


🚀 Features

  • Data ingestion from CSV/XLSX, with train/test split or pre-split datasets
  • Balanced Random Forest, SVM, XGBoost, and AutoGluon model training with hyperparameter search
  • SVM‐based undersampling: identify “free” support vectors for downsampling training set (+ validation)
  • FCCA discretization
  • GOSDT (Optimal Sparse Decision Trees) for interpretable optimal decision tree
  • Fully YAML‐driven configuration

🛠️ Prerequisites

  • Python 3.73.12 (recommended 3.10)
  • git, pip, and optionally conda

📦 Installation

From PyPI

# (Optional) Create & activate a fresh conda env with Python 3.10
conda create -n crystal_ml python=3.10 -y
conda activate crystal_ml

# Install
pip install crystal_ml_pipeline

### From source
git clone https://github.com/yourusername/crystal-ml.git
cd crystal-ml
pip install .

⚙️ Configuration

All pipeline options live in a single config.yaml at your project root. Copy the template in the repo ([text](https://gitlab.com/mraffaele87/crystal-ml/-/blob/master/config.yaml?ref_type=heads)) and tweak sections as needed.

🎯 Quickstart

1. Create a script, e.g. run.py:

from crystal_ml.pipeline import run_pipeline

if __name__ == "__main__":
    run_pipeline("config.yaml")


2. Prepare config.yaml and place your train/test files alongside.
3. Execute:

python run.py (alternatively, use your favourite IDE to run the project)

4. Inspect the logs/ folder for:
- Excel reports (*_Performance.xlsx, *_Results.xlsx)
- Pickled objects (.pkl)
- PNG charts (*.png)
- Optimal tree tree diagrams

📄 License
crystal_ml_pipeline is released under the MIT License. See LICENSE for details.

Built with ❤️ by Raffaele Mariosa
GitHub · PyPI

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

crystal_ml_pipeline-0.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

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

crystal_ml_pipeline-0.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file crystal_ml_pipeline-0.0.tar.gz.

File metadata

  • Download URL: crystal_ml_pipeline-0.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for crystal_ml_pipeline-0.0.tar.gz
Algorithm Hash digest
SHA256 712009d79d20746cf68ceb9410064facdbbbf0a69f0261130bfe03b1aecc0547
MD5 edde5bee4aa92e5150cafc8bf1459542
BLAKE2b-256 6e483017a16a366a8a84d0870fb9370203f6cb891ba00cdb45ddf1b884438adc

See more details on using hashes here.

File details

Details for the file crystal_ml_pipeline-0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crystal_ml_pipeline-0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51ac2a85341d625a08543e9308900204cef1aa55b2954f7647378fb805192465
MD5 3332a52430e1cda3cd3a9b8d4f951d9a
BLAKE2b-256 1eb4855a0e73154f44c1a531862ced97916bf8be49573c2b090469f0ba1da8ff

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