Repository of Machine Learning Models
This repository collects together an archive of pre-built machine learning models that can be readily shared for individuals to download and to demonstrate the model in action.
The sample R pre-built models rain, iris, and clothes-recommender serve as templates which model package authors can mimic. The model package file .mlm is simply a zip archive containing scripts like demo.R or demo.py, and the required support files. The DESCRIPTION.yaml file contains meta-information about the package and is used by the mlhub command line tool.
A sample DESCRIPTION.yaml file is:
meta: name : rain title : Predict likelihood of rain tomorrow using decision tree. languages : R license : gpl3 display : display version : 1.1.5 author : Graham Williams <Graham.Williams@togaware.com> keywords : r, prediction, classification, decision tree dependencies : linux: R, atril cran: rpart, magrittr, dplyr, tidyr, rattle rgithub: gganimate commands: demo : Run the model and present performance metrics. print : View a textual representation of the model. display: View a graphic represetnation of the model. score : description: Predict rain tomorrow interactive or supplied dataset. optional: <csv file> A CSV file with columns as noted in README.
One of gpl3 (strong license requiring derivative works to also be open source) or mit (moderate license not limiting derivative work). A LICENSE file is provided within the package.
This can be python or R. The language is then a dependency that is checked for and installed as required.
A list of other packages (and optionally versions) that the model depends on. For python these might form the contents of requirements.txt for a pip install, for example. On Ubuntu, specific OS packages might be searched for to be installed before using pip install. Similarly for R packages, OS distributed versions of the packages are sought first and then R's own package installer is used if no OS version found. In general, we are moving to perform the dependency install within a local container for each model so as to not require sys admin access nor to affect other users.
dependencies: rattle, rpart, magrittr
A list of commands which implemented by the model package that require a graphic display to present visual results. MLHub will check if there is a display available and if not the user is informed and given the option to exit or continue.
display: demo display
The name and email address of the original model developer. This can be different to the person who packages the model for the MLHub.
The name and email address of the person who packaged the model for sharing on ML Hub.
The name and email address of the person who is maintaining the model package for the ML Hub.
Each model archive must come with a license with a LICENSE file capturing the license. Depending on the license of the original model, the model package author may be limited as to the choice of license. Generally favoured licenses include GPL3 and MIT.