Training Sets, Test Sets, R, and ggplot
- It is necessary that the students have the background one would get by viewing my two Udemy courses on linear and polynomial regression.
- Students will need to have R and RStudio installed on their own computers.
In this course, I show you how to evaluate the performance of a regression model using training sets and test sets. We will use R and ggplot as our tools. Along the way, we will learn how to row-slice data frames, use the predict function in R, and add titles and labels to our plots. We will also work on our programming skills by learning how to write for loops and functions of two variables.
Students should have the background in R, ggplot, and regression equivalent to what one would have after viewing my two Udemy courses on linear and polynomial regression. At a relaxed pace, it should take about two weeks to complete the course.
- This course is for those looking to improve their R programming skills.
- This course is for those with the background equivalent to what one would have after viewing my first two Udemy courses in linear and polynomial regression.
- Row-slicing Data Frames08:01
- Plotting the Training and Test Sets07:37
- Plotting the Least-Squares Line09:43
- Calculating the Test MSE05:58
- Generating a Quadratic Model06:59
- Calculating the Test MSE for the Quadratic Model02:42
- For Loops03:30
- lm Revisited03:31
- MSE via a For Loop07:39
- Visualizing the MSE's05:41
- Functions of Two Variables01:59
- For Loop inside a Function07:44
- Variability of the Test MSE15:29
- Course Wrap-up02:24
Dr. Charles Redmond is a professor in the Tom Ridge School of Intelligence Studies and Information Science at Mercyhurst University. He has been a member of the Department of Mathematics and Computer Systems at Mercyhurst for 21 years and has recently completed a term as chair of the department. Dr. Redmond received his PhD in mathematics from Lehigh University in 1993 and has published in the Annals of Applied Probability, the Journal of Stochastic Processes and Their Applications, Mathematics Magazine, the College Mathematics Journal, and Mathematics Teacher. In his spare time he enjoys making music and computer generated art, reading, and owning a Clumber Spaniel.