Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upggplot.train level plots has incorrectly reordered axis #620
Comments
|
I think I have a fix ready, just need to figure out how to submit it... In the meantime, one more example:
|
If values are numeric add sorted levels to factors to fix ggplot axes values.
|
I have added a pull request #624 as an attempt to fix this issue. Both @MarekOzana's and my examples produce expected plots. I hope I did not break anything... |
Add sorted levels to factors (attempt to fix #620)
It seems that ggplot.train is converting the tuneGrid parameters into factors and thus sometimes creating cases when numerical order is broken. Consequently the charts have incorrect axis order.
e.g. instead of 0.0001, 0.01, 1 it produces 1e-2, 1e-4, 1 (string order not number order).
Minimal, reproducible example:
the produced chart has incorrectly ordered sigma axes.
Session Info: