DIR Return Create A Forum - Home
---------------------------------------------------------
QA_Board
HTML https://qaboard.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Questions for R / RStudio (Fall 2023)
*****************************************************
#Post#: 140--------------------------------------------------
Question for HW8 and question 1 last part
By: YuyangWu Date: October 31, 2023, 7:21 pm
---------------------------------------------------------
According to the plot result, we may guess when k equal to
which number will let the mse be small. However, is there any
more useful way to determine ?
#Post#: 142--------------------------------------------------
Re: Question for HW8 and question 1 last part
By: Taeho Kim Date: October 31, 2023, 7:31 pm
---------------------------------------------------------
We need to choose k that provides the minimum MSE.
That is our optimal level k.
Let say My.MSE is the vector of MSEs for different k values.
Then, which.min(My.MSE) will give you the index for the minimum
MSE.
But, I still think the graph is good enough to find out the
optimal k.
*****************************************************