Quick-start exercises: Visualize

These exercises are based on process, build and test data for an Additive Manufacturing part. Together, the MI Machine Learning Quick-start exercises walk through solving a build optimization problem for this part, starting with creating a trained machine learning model from sparse, noisy data, and ending with a potential set of build parameters to try.

In the exercises for the Visualize app, you will:

  • View a model’s correlation matrix. 
  • Visualize a trained model’s parameter space using 2D plots of output vs input features.
  • View parallel-axis plots of multiple output features.

Pre-requisites:

Exercise 1: View model correlations

One of the key ways to use machine learning is looking at the relationships between the input and output features of a trained model via its correlation matrix.

The correlation matrix can also be used to quickly check the validity of your newly-trained model; typically we know the underlying relationship between at least some of our input and output features, and those should be reflected in the correlation matrix.

  1. In Granta MI, go to Machine Learning > Visualize
  2. Find the model that you created during the Training app exercises with the highest Model Quality.
  3. Right-click the model's name and select  View correlation matrix.
Tip: The table lists the correlation between the input features (rows) and output features (columns). These should show that:
  • Hatch distance and Hatch offset have the least effect on the test data.
  • Border speed and Surface finish (roughness) are the most strongly correlated features.

Exercise 2: Plot input features against output features

MI Machine Learning also allows you to explore a trained model’s parameter space graphically. In this exercise, we’ll view the model’s predictions on a 2D plot.

  1. Click Plot model features. This takes you to the Plot Features page, keeping the current model selected.
  2. Click Visualize to plot the default Input and Output with the rest of the input features set to a fixed value. The model’s prediction (blue line) and uncertainty (green shaded area) for the selected Output are plotted against the selected Input. There are some step changes on the plot. This is expected, particularly for smaller datasets, and is usually due to differences in the training dataset across different parts of the parameter space (for example, having fewer data points or noisier test data in some parts of the model range).
  3. Inspect other parts of the model’s parameter space.
    1. Change the Output (y-axis) to the model’s second output feature, and click Visualize to update the plot.
    2. Edit the fixed Value of the other input features:
      1. In the table, click the Value cell for the input(s) you want to edit, and enter the new value(s). The currently-selected Input’s row is grayed out and cannot be edited.
      2. Use the Model range and Correlation to inform your choice of Value.
      3. Click Visualize to re-plot at the new input values.
    3. Click Reset to clear the plot area and restore the default values for Input, Output and the Value column.

Exercise 3: Compare several output features

As an alternative to 2D plots, you can also compare some or all output features against each other and their Model range for a given set of inputs. This is particularly useful in models with a large number of output features, where you might want to focus on a subset of key properties.

  1. Click View model outputs. This takes you to the View Outputs page, keeping the current model selected.
  2. Click the Select outputs drop-down, and click  Select all.
  3. Click outside the menu, then click Visualize to plot both outputs on parallel axes, at the default values of all input features.
  4. Inspect other parts of the model’s parameter space by editing the Value of the input features:
    1. In the table, click the Value cell for the input feature you want to edit, and enter a new value. Use the Model range to inform your choice of Value.
    2. Click Visualize to re-plot at the new input values.
    3. Click Reset to clear the selected outputs and return the Value column to its default values.