GEE: Use Grid Search to find the optimal parameters or parameter combination of the machine learning algorithm

Author:CSDN @ _养乐多_

This article records the code for calculating the optimal parameters of the machine learning classification algorithm in the Google Earth Engine (GEE) platform, including the optimization of a single parameter and the optimization of different parameter combinations. The optimal parameter calculation method used is Grid Search. There is no ready-made Grid Search API on the GEE platform. Therefore, this article manually implements the Grid Search method on GEE to find the optimal parameters. Taking the kNN nearest neighbor classification method as an example, the classification accuracy under different number of nearest neighbors, search methods, distance measurement methods and different parameter combinations were calculated. Finally, the accuracy is drawn into a scatter plot. The scatter plot is as follows. The horizontal axis represents the combination of different parameters, the vertical axis represents the classification accuracy, and the point with the highest accuracy represents the optimal parameter.

Insert image description here


Article directory

      • 1. Grid Search method
      • 2. Import sample data and feature variables
      • 3. Single parameter
          • 3.1 Number of nearest neighbors
          • 3.2 Search method
          • 3.3 Distance measurement method
      • 4. Combination of multiple variables
      • 5. Code link


1. Grid Search

Guess you like

Origin blog.csdn.net/qq_35591253/article/details/134947603