In my view, cross-validation is used to compare models by using as much data as possible. For example it can be used to compare a perceptron neural network and a decision tree for the same problem. Or it can be used to study the number of neurons of a neural network for a particular problem. Here it’s about comparing models/architectures.
Nevertheless, in my view, cross-validation doesn’t seem suitable to find the best weights of a neural network because at each round of the cross-validation, the weights are reinitialized.
Can you confirm my point of view ? that cross-validation is only used to compare models/architectures and is not suitable to find the best parameters of these models/architectures ?
Thank you.
You have the right idea, yes.
Typically you use cross validation to estimate the accuracy on unseen data. This estimate helps you to select the suitable model type/parameters etc.
Once you decided on the model configuration, you can train the model on the entire dataset. (Just always keep in mind that the training error on the entire dataset is not a good estimate for the error on unseen data.)