I am using the mlr
package in R to run the KNN algorithm. I am using tuneParams
to search for the optimal k
. When I run tuneParams
the output shows the performance for each value of k
. How can I save the performance for each k
? The TuneResult
object only has the optimal performance. I would like to use this to create a graph with the performance as a function of k
.
Asked
Active
Viewed 96 times
-1

mathnerd
- 9
-
1What have you tried to achieve this? Please include your code. – Ishaan Javali Nov 26 '18 at 01:56
-
I've tried using the ``sink`` function to save the output (which didn't work), but I was wondering if ``mlr`` stores it somewhere and I can access it. – mathnerd Nov 26 '18 at 02:00
-
Can you provide the code you're using please? – Lars Kotthoff Nov 26 '18 at 03:07
-
I figured it out, you can use ``TuneResult$opt.path$env$path`` – mathnerd Nov 26 '18 at 03:11
1 Answers
0
To complete the answer you found yourself: The best way to access all the settings that have been tried out:
as.data.frame(TuneResult$opt.path)

jakob-r
- 6,824
- 3
- 29
- 47