7.1 kmeans configure
20211121
The kmeans package is Python based and utilises the system application ffmpeg for generating a video of the algorithm in action. Python libraries utilised include numpy, matplotlib, pandas, and scikit-learn. On a Ubuntu system the first three can be system installed as python3-numpy, python3-matplotlib, and python3-pandas. The scikit-learn library can be installed from PyPI. For MacOS they can all be installed from PyPI.
Output will be something like:
*** The following required system packages are already installed:
ffmpeg
*** The following required system packages are already installed:
python3-numpy python3-matplotlib python3-pandas
*** The following required pip packages are already installed:
scikit-learn
*** Downloading required files ...
To view the model's README:
ml readme kmeans
Python and support files are downloaded from GitHub as specified in the MLHUB.yaml file.
meta:
name : kmeans
title : An animation demonstration for the kmeans clustering
keywords : python, visualisation, clustering
languages : py
license : gpl3
author : Gefei Shan, Anita Williams
url : https://github.com/acwkayon/kmeans
dependencies:
system:
- ffmpeg
python3:
- numpy
- matplotlib
- pandas
pip3:
- scikit-learn
- plotnine
files:
- README.md
- demo.py
- train.py
- predict.py
- utils.py
- iris.csv
commands:
demo : Demonstrate the model capabilities in one easy session.
train : Training the kmeans model on a given csv data file.
predict : Label the dataset with a provided model file (csv for cluster centres).
normalise : Remap numeric input csv columns using z-score.
visualise : Generate static plot of the final clustering.Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0