Randomness in Artificial Intelligence & Machine Learning

后端 未结 5 1076
梦如初夏
梦如初夏 2020-12-29 11:53

This question came to my mind while working on 2 projects in AI and ML. What If I\'m building a model (e.g. Classification Neural Network,K-NN, .. etc) and this model uses s

5条回答
  •  Happy的楠姐
    2020-12-29 12:36

    There are models which are naturally dependent on randomness (e.g., random forests) and models which only use randomness as part of exploring the space (e.g., initialisation of values for neural networks), but actually have a well-defined, deterministic, objective function.

    For the first case, you will want to use multiple seeds and report average accuracy, std. deviation, and the minimum you obtained. It is often good if you have a way to reproduce this, so just use multiple fixed seeds.

    For the second case, you can always tell, just on the training data, which run is best (although it might actually not be the one which gives you the best test accuracy!). Thus, if you have the time, it is good to do say, 10 runs, and then evaluate on the one with the best training error (or validation error, just never evaluate on testing for this decision). You can go a level up and do multiple multiple runs and get a standard deviation too. However, if you find that this is significant, it probably means you weren't trying enough initialisations or that you are not using the right model for your data.

提交回复
热议问题