https://github.com/slickml/slick-ml
SlickML π§: Slick Machine Learning in Python
https://github.com/slickml/slick-ml
data-science machine-learning python
Last synced: 3 months ago
JSON representation
SlickML π§: Slick Machine Learning in Python
- Host: GitHub
- URL: https://github.com/slickml/slick-ml
- Owner: slickml
- License: mit
- Created: 2020-08-31T16:15:41.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-26T00:52:52.000Z (almost 2 years ago)
- Last Synced: 2025-09-29T15:31:23.716Z (9 months ago)
- Topics: data-science, machine-learning, python
- Language: Python
- Homepage: https://www.SlickML.com
- Size: 25.8 MB
- Stars: 28
- Watchers: 1
- Forks: 9
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://github.com/slickml/slick-ml/actions/workflows/ci.yml)
[](https://github.com/slickml/slick-ml/actions/workflows/cd.yml)
[](https://codecov.io/gh/slickml/slick-ml)
[](https://pepy.tech/project/slickml)
[](https://github.com/slickml/slick-ml/blob/master/LICENSE/)


[](https://www.slickml.com/slack-invite)

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 models[1](https://arxiv.org/pdf/2207.08815.pdf). 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](https://github.com/zenml-io/zenml), [BentoML](https://github.com/bentoml/BentoML),
and [Prefect](https://github.com/PrefectHQ/prefect). More details coming soon π€ ...
## π Documentation
β¨ The API documentation is available at [docs.slickml.com](https://www.docs.slickml.com).
## π Installation
To begin with, install [Python version >=3.8,<3.12](https://www.python.org) and to install the library
from [PyPI](https://pypi.org/project/slickml/) simply run πββοΈ :
```
pip install slickml
```
or if you are a [python poetry](https://python-poetry.org/) user, simply run πββοΈ :
```
poetry add slickml
```
π£ Please note that a working [Fortran Compiler](https://gcc.gnu.org/install/) (`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. [python poetry](https://python-poetry.org/), [python virtualenv](https://docs.python.org/3/library/venv.html), [pyenv virtualenv](https://github.com/pyenv/pyenv-virtualenv), or [conda environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html). Our recommendation is to use `python-poetry` π₯° for everything π.
## π Quick Start
β
An example to quickly run a `Feature Selection` pipeline with embedded `Cross-Validation` and `Feature-Importance` visualization:
```python
from slickml.feautre_selection import XGBoostFeatureSelector
xfs = XGBoostFeatureSelector()
xfs.fit(X, y)
```

```python
xfs.plot_cv_results()
```

```python
xfs.plot_frequency()
```

β
An example to quickly find the `tuned hyper-parameter` with `Bayesian Optimization`:
```python
from slickml.optimization import XGBoostBayesianOptimizer
xbo = XGBoostBayesianOptimizer()
xbo.fit(X_train, y_train)
```

```python
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:
```python
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()
```

```python
clf.plot_feature_importance()
```

```python
clf.plot_shap_summary(plot_type="violin")
```

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

```python
clf.plot_shap_waterfall()
```

β
An example to train/validate a `GLMNetCV Classifier` with `Cross-Validation` and `Coefficients` visualizations:
```python
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()
```

```python
clf.plot_coeff_path()
```

β
An example to quickly visualize the `binary classification metrics` based on multiple `thresholds`:
```python
from slickml.metrics import BinaryClassificationMetrics
clf_metrics = BinaryClassificationMetrics(y_test, y_pred_proba)
clf_metrics.plot()
```

β
An example to quickly visualize some `regression metrics`:
```python
from slickml.metrics import RegressionMetrics
reg_metrics = RegressionMetrics(y_test, y_pred)
reg_metrics.plot()
```

## π§βπ»π€ Contributing to SlickMLπ§
You can find the details of the development process in our [Contributing](CONTRIBUTING.md) 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 π

## β π π² Need Help?
Please join our [Slack Channel](https://www.slickml.com/slack-invite) 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:
```bib
@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}
}
```