# NOT RUN {
optimalKn <- knChooseReMeDI(sampleTDataMicroseconds[as.Date(DT) == "2018-01-02",],
knMax = 10, tol = 0.05, size = 3,
lower = 2, upper = 5, plot = TRUE)
optimalKn
# }
# NOT RUN {
# We can also have a much larger search-space
optimalKn <- knChooseReMeDI(sampleTDataMicroseconds[, as.Date(DT) == "2018-01-02"],
knMax = 50, tol = 0.05,
size = 3, lower = 2, upper = 5, plot = TRUE)
optimalKn
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab