Session Ready
Exercise

Bias-variance analysis

Understanding your model's performance in terms of bias and variance is an important step to decide on possible improvements.

In this exercise, you are going to train a Multi-Layer Perceptron (MLP) neural network on a subset of the pulsar classification dataset to decide whether a star belongs to the pulsar category or not based on eight numerical descriptors. You will then calculate the classifier's bias and variance and assess its performance based on these two indicators.

The pulsar data has been already split into 80% training and 20% testing for you. They are available in the pulsar_train and pulsar_test variables. The nnet package provides an easy way of building an MLP model, so we have pre-loaded it.

Instructions 1/4
undefined XP
  • 1
  • 2
  • 3
  • 4
  • Fit an MLP model with 3 hidden neurons on the pulsar_train data to predict Class from all other variables. Save your model in the mdlNNet variable.