Predictive and Specialized Modeling > Neural Networks > Example of a Neural Network
Publication date: 07/24/2024

Example of a Neural Network

Suppose you want to create a model to predict the body fat percentage as a function of several anthropometric measurements. Follow the steps below to build the neural network model:

1. Select Help > Sample Data Folder and Body Fat.jmp.

2. Select Analyze > Predictive Modeling > Neural.

3. Select Percent body fat and click Y, Response.

4. Select all of the other columns (Age (years) through Wrist circumference (cm)) and click X, Factor.

5. Click OK.

6. Enter 0.2 for the Holdback Proportion.

7. Enter 1234 for the Random Seed.

Note: In general, results vary due to the random nature of choosing a validation set. Entering the seed above enable you to reproduce the results shown in this example.

8. Check the Transform Covariates option.

9. Click Go.

Figure 3.3 Neural Report 

Neural Report

Results are provided for both the training and validation sets. Use the results of the validation set as a representation of the model’s predictive power on future observations.

The R-Square statistic for the Validation set is 0.792. This value suggests that the model is performing well in predicting the body fat percentage and that the model's predictions align closely with the actual values in the Validation set.

10. Click the red triangle next to Model NTanH(3) and select Plot Actual by Predicted. This provides an additional assessment of model fit.

Figure 3.4 Actual by Predicted Plot 

Actual by Predicted Plot

The points fall along the line, signifying that the predicted values are similar to the actual values.

11. To get a general understanding of how the X variables are impacting the predicted values, click the red triangle next to Model NTanH(3) and select Profiler.

12. Click the Prediction Profiler red triangle and select Appearance > Arrange in Rows.

13. Enter 7 next to How many plots across?

Figure 3.5 Prediction Profiler 

Prediction Profiler

Some of the variables have profiles with positive slopes, and some negative. For example, the variable Weight (lbs) has a positive slope. This indicates that a higher body weight is associated with higher levels of Percentage body fat. The variable Height (inches) is the participant's height measured in inches. This variable has a negative slope, indicating that as Height (inches) increases, the predicted Percentage body fat tends to decrease.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).