Deep learning fits a neural network for classification or regression. A random 30% of the data is used for cross-validation to find the optimal number of epochs according to cross-validation loss. The final network is trained on all data for the optimal number of epochs.

This article describes how to create a Cross-validation Deep Learning output as shown below.

## Requirements

- A numeric or categorical variable to be used as an
**Outcome**variable to be predicted. **Predictor**variables that will be considered as predictors of the outcome variable.

## Method

- In the
**Anything**menu select**Advanced Analysis >****Machine Learning > Deep Learning.** - In the
**object inspector**go to the**Inputs**tab. - In the
**Output**menu select the variable to be predicted by the*predictor variables.* - Select the predictor variable(s) from the
**Predictor(s)**list. - OPTIONAL: Select the algorithm you wish to use in the
**Inputs > Algorithm**. By default, the Deep Learning algorithm is used. - OPTIONAL: Select the desired
**Output**type:**Accuracy**: When the*Outcome*is categorical the Accuracy outcome produces a table of accuracy by class. When the*Outcome*is numeric it calculates Root Mean Squared Error and R-squared.**Prediction-Accuracy Table**: Produces a table relating the observed and predicted*outcome*. Also known as a confusion matrix.**Cross Validation**: Produces charts of loss (e.g., network error) and accuracy or mean absolute error vs training epoch.**Network Layers**: This returns a description of the layers of the network.

- OPTIONAL: Select the desired
**Missing Data**treatment. (See Missing Data Options). - OPTIONAL: Select
**Variable names**to display variable names in the output instead of labels. - OPTIONAL: Specify the number of training rounds by inputting the desired number into the
**Maximum Epochs**. - OPTIONAL:
**Hidden layers**Input a comma-delimited list of the number of units in the hidden layers. - OPTIONAL: Select
**Normalize predictors**for the predictor variables to be normalized to zero mean and unit variance. This is recommended if the variables differ significantly in their ranges. Note that categorical variables are also converted to dummy variables.

## Next

How to Create a Classification And Regression Trees (CART)

How to Run Machine Learning Diagnostics - Prediction-Accuracy Table

How to Run Machine Learning Diagnostics - Table of Discriminant Function Coefficients extension

How to Create an Ensemble of Machine Learning Models

How to Run a Gradient Boosting Machine Learning Model

How to Compare Machine Learning Models

How to Run Machine Learning Linear Discriminant Analysis

How to Save Machine Learning Discrimination Variables

How to Save Machine Learning Predicted Values Variables

How to Save Machine Learning Probability of Each Response Variable

How to Run Support Vector Machine