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

**URL:** <https://discourse.julialang.org/t/what-does-mlj-evaluate-mach-to-mach-parameters/110857>\
**Category:** General Usage\
**Tags:** mlj\
**Created:** [February 27, 2024, 4:43pm UTC](https://discourse.julialang.org/t/what-does-mlj-evaluate-mach-to-mach-parameters/110857 "2024-02-27T16:43:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [February 27, 2024, 4:43pm UTC](https://discourse.julialang.org/t/what-does-mlj-evaluate-mach-to-mach-parameters/110857/1 "2024-02-27T16:43:27Z")

</div>

The [documentation](https://alan-turing-institute.github.io/MLJ.jl/dev/evaluating_model_performance/#MLJBase.evaluate!) 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? …

---

<div class="post-metadata">

**Author:** ![CameronBieganek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cameronbieganek/32/6915_2.png) [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Post date:** [February 27, 2024, 6:59pm UTC](https://discourse.julialang.org/t/what-does-mlj-evaluate-mach-to-mach-parameters/110857/2 "2024-02-27T18:59:45Z")

</div>

The docstring says

```julia
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).
