1. Learn
  2. /
  3. Courses
  4. /
  5. Hyperparameter Tuning in R

Exercise

What are the coefficients?

To get a good feel for the difference between fitted model parameters and hyperparameters, we are going to take a closer look at those fitted parameters: in our simple linear model, the coefficients. The dataset breast_cancer_data has already been loaded for you and the linear model call was run as in the previous lesson, so you can directly access the object linear_model.

In our linear model, we can extract the coefficients in the following way: linear_model$coefficients. And we can visualize the relationship we modeled with a plot.

Remember, that a linear model has the basic formula: y = x * slope + intercept

Instructions

100 XP
  • Explore the coefficients of the linear_model in the console.
  • Plot the regression line with ggplot2.
  • Assign the correct coefficients to slope and intercept.