For this example, we will use the Adult dataset. We will walk through the steps to get this dataset in the proper form so that we can train a multilayer perceptron on it:
- We will first load the libraries that we need. We will use the mxnet package to train the MLP model, the tidyverse family of packages for our data cleaning and manipulation, and caret to evaluate our model. We load the libraries using the following code:
library(mxnet)library(tidyverse)library(caret)
This code will not produce any output to the console; however, you will see a checkmark next to these libraries in the Packages pane, indicating that the packages are now ready to use. Your Packages pane should look like the following screenshot: ...