November 2017
Beginner
286 pages
8h 13m
English
Boosting is designed to work best with weak learners, so a very small number of hidden neurons in the model's hidden layer are used.
Concretely, we will begin with the simplest possible multilayer perceptron that uses a single hidden neuron. To understand the effect of using boosting, a baseline performance is established by training a single neural network (and measuring its performance).
This is to accomplish the following:
> library(nnet)
> n_model <- nnet(CLASS ~ ., data = magic_train_df_pp, size = 1)
> n_test_predictions <- predict(n_model, magic_test_pp,
type = "class")
> (n_test_accuracy <- mean(n_test_predictions ==
magic_test_output))
[1] 0.7948988
This establishes that we have a baseline accuracy of around 79.5 percent. ...
Read now
Unlock full access