Skip to content
Some code for certain tasks related to machine learning
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ML_snippets.py
README.md
blob_demo.py
demos.ipynb
explanations_demo.ipynb
games.csv
price_clustering.ipynb
tree_explainer.py

README.md

ML snippets

Some of the code I've put together to do weird/interesting/cool things (mostly at work) with machine learning models for classification problems. The core code is in ML_snippets.py and usage examples are shown in demos.ipynb. This is heavily reliant on the pandas and scikit-learn libraries, though it wouldn't be too difficult to rewrite and avoid the need for pandas.

explanations_demo.ipynb has a demonstration of two methods for generating human-interpretable explanations/justifications of the predictions of a scikit-learn random forest classifier. The code for one of those methods is found in tree_explainer.py.

price_clustering.ipynb has a demo of segmenting a set of products into natural price bins. That notebook is self-contained; it pulls a small data set from the web.

You can’t perform that action at this time.