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.1.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.1-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: crystal_ml_pipeline-0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 6827a0a08744357b2cca74dba92fc55984797caa21f3ede279cc8a82c393044b
MD5 34961774d66d290e1fce402718b0c6fd
BLAKE2b-256 e2d288cb4f4bb02ad3edb7464bdb76260dfe40532471a8ef066e5dd7669f0de1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for crystal_ml_pipeline-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11eae9acf36f3c4eb1496656e83bacd899db1aac7712011e45f40f29f2e6b5b3
MD5 4eb2d1fd01a704d1ff6b1b61dd0a4b4d
BLAKE2b-256 64181e86ccc287cb18399bdecd7c24a66691efd4ba0184470faf262754acc938

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