Skip to main content

SlickML: Slick Machine Learning in Python

Project description

build docs codecov downloads license pypi_version python_version slack_invite twitter_url

SlickML🧞: Slick Machine Learning in Python

Explore Releases 🟣 Become a Contributor 🟣 Explore API Docs 🟣 Join our Slack 🟣 Tweet Us

🧠 SlickML🧞 Philosophy

SlickML is an open-source machine learning library written in Python aimed at accelerating the experimentation time for ML applications with tabular data while maximizing the amount of information can be inferred. Data Scientists' tasks can often be repetitive such as feature selection, model tuning, or evaluating metrics for classification and regression problems. We strongly believe that a good portion of the tasks based on tabular data can be addressed via gradient boosting and generalized linear models1. SlickML provides Data Scientists with a toolbox to quickly prototype solutions for a given problem with minimal code while maximizing the amount of information that can be inferred. Additionally, the prototype solutions can be easily promoted and served in production with our recommended recipes via various model serving frameworks including ZenML, BentoML, and Prefect. More details coming soon 🤞 ...

📖 Documentation

✨ The API documentation is available at docs.slickml.com/slick-ml.

🛠 Installation

To begin with, install Python version >=3.9,<3.13 and to install the library from PyPI simply run 🏃‍♀️ :

pip install slickml

or if you are a uv user, simply run 🏃‍♀️ :

uv add slickml

📣 Please note that a working Fortran Compiler (gfortran) is also required to build the package. If you do not have gcc installed, the following commands depending on your operating system will take care of this requirement.

# Mac Users
brew install gcc

# Linux Users
sudo apt install build-essential gfortran

The SlickML CLI tool behaves similarly to many other CLIs for basic features. In order to find out which version of SlickML you are running, simply run 🏃‍♀️ :

slickml --version

🐍 Python Virtual Environments

In order to avoid any potential conflicts with other installed Python packages, it is recommended to use a virtual environment, e.g. uv, python virtualenv, pyenv virtualenv, or conda environment. Our recommendation is to use uv 🥰 for everything 😁.

📌 Quick Start

✅ An example to quickly run a Feature Selection pipeline with embedded Cross-Validation and Feature-Importance visualization:

from slickml.feautre_selection import XGBoostFeatureSelector
xfs = XGBoostFeatureSelector()
xfs.fit(X, y)

selection

xfs.plot_cv_results()

xfscv

xfs.plot_frequency()

frequency

✅ An example to quickly find the tuned hyper-parameter with Bayesian Optimization:

from slickml.optimization import XGBoostBayesianOptimizer
xbo = XGBoostBayesianOptimizer()
xbo.fit(X_train, y_train)

clfbo

best_params = xbo.get_best_params()
best_params

{"colsample_bytree": 0.8213916662259918,
 "gamma": 1.0,
 "learning_rate": 0.23148232373451072,
 "max_depth": 4,
 "min_child_weight": 5.632602921054691,
 "reg_alpha": 1.0,
 "reg_lambda": 0.39468801734425263,
 "subsample": 1.0
 }

✅ An example to quickly train/validate a XGBoostCV Classifier with Cross-Validation, Feature-Importance, and Shap visualizations:

from slickml.classification import XGBoostCVClassifier
clf = XGBoostCVClassifier(params=best_params)
clf.fit(X_train, y_train)
y_pred_proba = clf.predict_proba(X_test)

clf.plot_cv_results()

clfcv

clf.plot_feature_importance()

clfimp

clf.plot_shap_summary(plot_type="violin")

clfshap

clf.plot_shap_summary(plot_type="layered_violin", layered_violin_max_num_bins=5)

clfshaplv

clf.plot_shap_waterfall()

clfshapwf

✅ An example to train/validate a GLMNetCV Classifier with Cross-Validation and Coefficients visualizations:

from slickml.classification import GLMNetCVClassifier
clf = GLMNetCVClassifier(alpha=0.3, n_splits=4, metric="auc")
clf.fit(X_train, y_train)
y_pred_proba = clf.predict_proba(X_test)

clf.plot_cv_results()

clfglmnetcv

clf.plot_coeff_path()

clfglmnetpath

✅ An example to quickly visualize the binary classification metrics based on multiple thresholds:

from slickml.metrics import BinaryClassificationMetrics
clf_metrics = BinaryClassificationMetrics(y_test, y_pred_proba)
clf_metrics.plot()

clfmetrics

✅ An example to quickly visualize some regression metrics:

from slickml.metrics import RegressionMetrics
reg_metrics = RegressionMetrics(y_test, y_pred)
reg_metrics.plot()

regmetrics

🧑‍💻🤝 Contributing to SlickML🧞

You can find the details of the development process in our Contributing guidelines. We strongly believe that reading and following these guidelines will help us make the contribution process easy and effective for everyone involved 🚀🌙 . Special thanks to all of our amazing contributors 👇

Repobeats analytics image

❓ 🆘 📲 Need Help?

Please join our Slack Channel to interact directly with the core team and our small community. This is a good place to discuss your questions and ideas or in general ask for help 👨‍👩‍👧 👫 👨‍👩‍👦 .

📚 Citing SlickML🧞

If you use SlickML in an academic work 📃 🧪 🧬 , please consider citing it 🙏 .

Bibtex Entry:

@software{slickml2020,
  title={SlickML: Slick Machine Learning in Python},
  author={Tahmassebi, Amirhessam and Smith, Trace},
  url={https://github.com/slickml/slick-ml},
  version={0.2.0},
  year={2021},
}

@article{tahmassebi2021slickml,
  title={Slickml: Slick machine learning in python},
  author={Tahmassebi, Amirhessam and Smith, Trace},
  journal={URL available at: https://github. com/slickml/slick-ml},
  year={2021}
}

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

slickml-0.4.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

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

slickml-0.4.0-py3-none-any.whl (102.5 kB view details)

Uploaded Python 3

File details

Details for the file slickml-0.4.0.tar.gz.

File metadata

  • Download URL: slickml-0.4.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for slickml-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d7ac4da6abca99e0e1f623c10f84e26aa2bad916e6a244d0d2bcac6827f436a1
MD5 2727e90bcf1db5f15201d39e7a3d0c87
BLAKE2b-256 f56e5949d6f1b30457cbc04257877e1dfe8c85057820f3ba7b23d77cdddea38d

See more details on using hashes here.

File details

Details for the file slickml-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: slickml-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 102.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for slickml-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e5e51be5d40cca06bd44f9af8d0894d169f24c5dc6e0582e4f79fb066c23c00
MD5 8e75f4796c3b12cfc40cf8d16cb68e85
BLAKE2b-256 b41ca50aa041d36950abce59abac1e7be40e353efafbe03ace047b752f561bf9

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