Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*R* I've trained two knn models, knn1 and knn2. I want to plot a graph of cross-validation RMSE vs neighbors for each but on the

*R*

I've trained two knn models, knn1 and knn2. I want to plot a graph of cross-validation RMSE vs neighbors for each but on the SAME plot, not two seperate plots.

Current code:

set.seed(1337) knn1 = train(....)

set.seed(1337) knn2 = train(....)

What I'm doing currently is:

plot(knn1, main = 'KNN 1') plot(knn2, main = 'KNN 2')

This plots them but separetely. How can I plot it so its on the same graph?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain the causes of indiscipline.

Answered: 1 week ago