0

I'm comparing a bunch of Machine Learning models on a dataset I have. The current model in production is a equation of the form:

y ~ a + b * x1^c * x2^d * x3^e,

Since I'd like to use the current situation as a benchmark to asses the improvement I'd get from other models, I've implemented it in R using:

powerModel <- nls(y ~ a + b * x1^c * x2^d * x3^e, 
                  data = df,
                  start = list(a = 0, b = 1, c = 1, d = 1, e = 0),
                  model=T)

This works fine, however I train my other models using cross-validation using the Caret package. I'd like to perform the same cross-validation on the nls model. However, I find nothing on how to use a custom formula in Caret. So my question is: how do I use a custom formulate or the nls model in Caret cross-validation training?

jmuhlenkamp
  • 2,102
  • 1
  • 14
  • 37
marqram
  • 725
  • 12
  • 26

1 Answers1

2

The instructions to make a custom method are here.

topepo
  • 13,534
  • 3
  • 39
  • 52