HyperAI

Parameter Tuning

Parameter AdjustmentRefers to adjusting parameters to achieve better results, with the goal of obtaining a better model: fixing errors and improving the accuracy of neural network training.

The optimal parameters of a model depend on many scenarios. In model evaluation and selection, in addition to the selection of the algorithm, its parameters also need to be set. Parameter adjustment is the process of completing parameter setting. At present, the common practice is to select a range and a step size for the parameter, such as [0, 0.2] with a step size of 0.05. In this way, there are 5 candidate parameter values, and the ideal value will be obtained from these 5 candidate values. Although the parameter value obtained in this way is not the optimal value, it can compromise between computational overhead and performance estimation.

Parameter adjustment implementation method

  • The model has multiple adjustable parameters, such as the kernel function type in SVM, the size of the C value, and the depth of the tree in the decision tree;
  • After selecting features and basic models, you can improve accuracy by adjusting model parameters;
  • For models with multiple parameters, each parameter needs to be tested one by one if it has different values.
  • For model evaluation, cross-validation methods are usually used, such as the K-fold method, which divides the training set into k equal parts, and then selects one part from 1-k as the test set each time, and the rest as the training set. The trained rules are used for model scoring, and finally the highest score among the k scores is taken as the final score.

Usually, the discriminant effect on the test set will be used to estimate the generalization ability of the model in actual application. The training data will be divided into training set and validation set, and model selection and parameter adjustment will be performed based on the performance on the validation set.

References:

【1】https://cloud.tencent.com/developer/article/1099605

【2】https://www.jianshu.com/p/e6feaad5399e