What does `MLJ.evaluate!(mach, ...)` to `mach` parameters

The documentation does not say anything about this unfortunately.

I am wondering how the parameters of the given machine mach are actually changed? Is it like a respective TunedModel?

Can I use the mach further for predictions? Will it be the best model of the evaluation or just a random one? …

The docstring says

Although `evaluate!` is mutating, `mach.model` and
`mach.args` are not mutated.

So, I think the hyperparameter object that you use to create the machine is not mutated when you call evaluate!.

Anyhow, if you want to predict on new data in the future, then you would normally re-fit your model on the complete data set that you have available, because cross-validation only fits on, e.g., 80% of the data (each model in a 5-fold cross-validation is fit on 4 out of 5 of the data partitions).

1 Like