The exercise in the previous section is repeated here using the PimaIndianDiabetes2 dataset instead. This dataset contains several missing values. As a result, we will first impute the missing values and then run the machine learning example.
The exercise has been repeated with some additional nuances, such as using multicore/parallel processing in order to make the cross-validations run faster.
To leverage multicore processing, install the package doMC
using the following code:
Install.packages("doMC") # Install package for multicore processing
Install.packages("nnet") # Install package for neural networks in R
Now we will run the program as shown in the code here:
# Load the library doMC library(doMC) # Register all cores registerDoMC(cores = 8) # Set seed to create a reproducible example set.seed(100) # Load the PimaIndiansDiabetes2 dataset data("PimaIndiansDiabetes2",package = 'mlbench') diab<- PimaIndiansDiabetes2 # This...