MLJ fit and predict

Through MLJ’s fit and predict methods, we get the machine trained and then use it for test sample prediction respectively.
What is the best way to get the training sample prediction?

If I use predict on the training sample, I get way high accuracy and it seems it is because the machine already knows this data and it able to nearly give perfect prediction.

You are probably experiencing Overfitting - Wikipedia

1 Like