Also, Do you know if it is possible to change de parameter "distance" of knn while I'm still using the function train() to build the model as you did? I would like to test different distances in the algorithm like for example, euclidian, manhattan..
This video is really helpful. Can you help me a little bit more ?. I am trying different method at the same time. How can I use repeated cv for random forest, svm and neural network here ?
The parameter: "tuneGrid =data.frame(k=seq(5,100,by=15))) # Try only these values in the CV step # tuneLength = 25) # Use 25 sequential numbers instead" you are testing different numbers of k-folds for cross-validation, or different numbers of k-neighbors? sorry I didn't understand the difference..
tuneGrid allows you to choose the values explicitly. tuneLength only tries with 25 values in the default interval (that varies from function to function and sometimes doesn't span all the "interesting" parameters).
Also, Do you know if it is possible to change de parameter "distance" of knn while I'm still using the function train() to build the model as you did? I would like to test different distances in the algorithm like for example, euclidian, manhattan..
I don't know either, but it's a good point. Manhattan distance is sometimes the best choice.
How can I use loocv for the Stacking Algorithms using R? Need to save prediction and I use caretList with 'rpart', 'knn', 'nb'
This video is really helpful. Can you help me a little bit more ?. I am trying different method at the same time. How can I use repeated cv for random forest, svm and neural network here ?
The parameter:
"tuneGrid =data.frame(k=seq(5,100,by=15))) # Try only these values in the CV step
# tuneLength = 25) # Use 25 sequential numbers instead"
you are testing different numbers of k-folds for cross-validation, or different numbers of k-neighbors? sorry I didn't understand the difference..
tuneGrid allows you to choose the values explicitly. tuneLength only tries with 25 values in the default interval (that varies from function to function and sometimes doesn't span all the "interesting" parameters).
I believe it’s different numbers of k-neighbors
How do we get the caret snippet ?
Download it here: github.com/mariocastro73/ML2020-2021/blob/master/scripts/caret.snippet and plug it into the section for snippets in Rstudio
How to use CV for logistic regression
@@arungandhi5612 Same as in minute 2:40 but knn -> glm and add familiy='binomial'
@@MarioCastroPonce thanks Mario , this snippet is of great help
@@arungandhi5612 cheers