In this example, we use the Chemical Manufacturing 2 data. We fit a neural network model for the categorical response, Performance, using all of the available predictors and the validation column. We use the options available in JMP Pro for this demo.
First, we select Analyze, then Predictive Modeling, and then Neural.
We start by adding Performance as the Y, Response variable.
We select the two groups of predictor variables as X, Factor.
You can enter a random seed for reproducibility, but we won’t use a random seed for this example. So, if you are following along, your results might be slightly different.
Finally, we select the Validation column as the validation variable, and click OK.
A Model Launch dialog box is provided, and it has many options. The default model has one hidden layer, with three nodes using the TanH activation function.
We’ll fit a neural model with two hidden layers and several nodes.
For the first layer, which is closest to the output, we’ll use one node from each activation function.
For the second layer, which is closest to the predictors, we’ll use three nodes from each activation function.
We’ll click Go to run the model.
Let’s look at the diagram for this model. To do this, we select Diagram from the red triangle for the model. This model has 16 predictors in the input layer, the two hidden layers with different activation functions, and the output layer.
Because we have a categorical response, the model is used to predict the probability of membership in the two Performance classes: Accept and Reject.
JMP reports the misclassification rate and confusion matrices for the training and validation data. The ROC curves and lift curves are red triangle options for the model.
You can see that the model performs better on the training data than it does on the validation data. Remember that neural networks tend to overfit your data. When you fit a neural network, you should have a test set to evaluate the performance of your model when it is applied to new data.
To explore this model, we can use the profiler. Because we have a categorical response, we’ll select Categorical Profiler from the red triangle. We have a lot of variables, so we’ll arrange this in rows.
To do this, we select Appearance from the red triangle for the profiler and then arrange in rows. We’ll enter 8 to arrange in two rows of eight.
You can see how the predicted probabilities change as we change the values of the predictors. The profiler also shows the nonlinear nature of this neural model.
A neural network builds a model using all of the predictors.
Let’s see which of the predictors are most important. To do this, we’ll select Assess Variable Importance from the red triangle for the profiler, and we’ll select the first option, Independent Uniform Inputs. This conducts a simulation to isolate the effects of the individual predictors.
From this simulation, you can see that some of the predictors are more important in the model than others.