This chapter shows you how to build and train basic neural networks in R through hands-on examples and shows how to evaluate different hyper-parameters for models to find the best set. Another important issue in deep learning is dealing with overfitting, which is when a model performs well on the data it was trained on but poorly on unseen data. We will briefly look at this topic in this chapter, and cover it in more depth in Chapter 3, Deep Learning Fundamentals. The chapter closes with an example use case classifying activity data from a smartphone as walking, going up or down stairs, sitting, standing, or lying down.
This chapter covers the following topics:
- Neural networks in R
- Binary classification
- Visualizing a neural network
- Multi-classification using the nnet and RSNNS packages
- The problem of overfitting data—the consequences explained...