2.2 Hello World

20200311 The MLHub package supports any number of commands that are exposed through the individual model packages. MLHub itself implements the following commands. Note that in the below examples everything from the # to the end of the line is ignored (it’s a comment).

$ ml                      # Summary of commands supported by ml.
$ ml available            # List of currated models on the MLHub.
$ ml installed            # List of models installed locally.
$ ml install   <model>    # Install the identified model.
$ ml configure <model>    # Install the model's required dependencies.
$ ml readme    <model>    # View the author's introduction of the model.
$ ml commands  <model>    # List commands supported by the model.
$ ml uninstall <model>    # Uninstall the model and (optionally) model cache.

Once MLHub is installed run the “Hello World” example which is the iris model commonly used in Statistics to demonstrate classification and prediction tasks. This uses the free and open source R statistical software package which will have been installed when you configured mlhub. Follow the commands here as a typical workflow for many MLHub packages:

$ ml install   iris       # Install the pre-built model named 'iris'.
$ ml configure iris       # Configure any dependencies for the model.
$ ml readme    iris       # View background information about the model.
$ ml commands  iris       # List of commands supported by the model.
$ ml demo      iris       # Run the demonstration of the pre-built model.

Different pre-built model packages will have different system dependencies and these will be installed by the configure command. After configuration it is useful to review the packager’s commentary in their readme. The list of commands supported by the package is provided by commands. The demo will then provide a quick (couple of minutes) demonstration of the capabilities of the package. If it looks interesting then the GUI will provide a quick interface to some of the functionality whilst the remaining commands provide specific functionality.

Other packages recommended for new Data Scientists to explore include beeswarm and animate. For the new to ML have a look at predicting whether it will rain tomorrow using the rain package. For Computer Vision AI have a look at objects and azcv.

Most model packages will support the following commands:

$ ml demo <model>         # Run the demonstration of the model.
$ ml gui  <model>         # Graphical display to utilise the model.

And then individual models will support model specific commands. Some examples include:

$ ml ocr azcv <file>
$ ml identify objects <file>
$ ml color colorize <file>
$ ml listen azspeech2txt
$ ml train rain <file>

Your donation will support ongoing development 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-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.