Reader small image

You're reading from  The Statistics and Machine Learning with R Workshop

Product typeBook
Published inOct 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781803240305
Edition1st Edition
Languages
Right arrow
Author (1)
Liu Peng
Liu Peng
author image
Liu Peng

Peng Liu is an Assistant Professor of Quantitative Finance (Practice) at Singapore Management University and an adjunct researcher at the National University of Singapore. He holds a Ph.D. in statistics from the National University of Singapore and has ten years of working experience as a data scientist across the banking, technology, and hospitality industries.
Read more about Liu Peng

Right arrow

Introducing ggplot2

Conveying information via graphs tends to be more effective and visually appealing than tables alone. After all, humans are much quicker at processing visual information, such as recognizing a car in an image. In building machine learning (ML) models, we are often interested in the training and test loss profile in the form of a line chart that indicates the reduction in the training and test set loss as the model gets trained for a more extended period. Observing performance metrics helps us better diagnose whether a model is underfitting or overfitting—in other words, whether the current model is too simple or overly complex. Note that the test set is used to approximate a future dataset, and minimizing the test set error helps the model generalize to new datasets, an approach known as empirical risk minimization. Underfitting refers to the case when the model does poorly in both training and test sets due to insufficient fitting power, while overfitting...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
The Statistics and Machine Learning with R Workshop
Published in: Oct 2023Publisher: PacktISBN-13: 9781803240305

Author (1)

author image
Liu Peng

Peng Liu is an Assistant Professor of Quantitative Finance (Practice) at Singapore Management University and an adjunct researcher at the National University of Singapore. He holds a Ph.D. in statistics from the National University of Singapore and has ten years of working experience as a data scientist across the banking, technology, and hospitality industries.
Read more about Liu Peng