2.2 Hello World

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

$ ml                      # Summary of commands supported by ml.
$ ml configure            # Configure the mlhub package itself.
$ ml available            # List of currated models on the MLHub repository.
$ ml installed            # List of models installed locally.
$ ml install   <model>    # Install a 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 one of the Hello World examples. A simple one is the rain model from Rattle which demonstrates the use of the decision tree machine learning modeller to predict the likelihood of it raining tomorrow. If it predicts rain, then I’ll take an umbrella with me to work, otherwise no need. The example comes from my Data Mining book. This uses the free and open source R statistical software package which will have been installed when you configured MLHub. The following sequence of commands illustrate the typical workflow for many MLHub packages:

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

Different 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.

Most model packages will support the demo command. The command will demonstrate the capabilities of the package.

Some packages also support the gui command which will provide a graphical interface to the package’s functionality.

$ ml gui  <model>         # Graphical display to utilise the model.

The remaining commands supported by a package then provide specific functionality usually in a manner suitable for command pipelines (see Section 4). A list of the individual package commands is provided through the commands command.



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-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0