Re: How to check the optimized parameters values found by the GridSearch?
Peter Reutemann <[email protected]> Thu, 12 Jan 2023 08:58:50 +1300
| Newsgroups | gmane.comp.ai.weka |
|---|---|
| Message-ID | <CAHoQ12Krmcfyf+sWuy=xmgtM4vVDRx3VQvbkss0vzeLKLF398A@mail.gmail.com> |
> I'm working on a classification problem with my custom dataset and using GridSearch to fine tune some tested classifiers and its internal parameters. > GridSearch seems to be working fine, it gets some great accuracy responses, better than i was getting manually, but i can't locate the optimal parameters values found by the GridSearch algorithm, neither in the log messages or when i save the resulted trained model and load it again (which forces to be printed the configuration values used). > How can i see the optimal parameters values found by GridSearch? Just check the output. The following was a simple run on the UCI dataset bolts with the default GridSearch setup, but with the gamma of the kernel set to 0.1 (default is 0.01). "Classifier: ..." gives you the full command-line of the best classifier found. The output after that just lists in detail what parameters were tested, what metric used for evaluating the performance, the coordinates in the grid with the best performance and what the grid coordinates mean in terms of actual parameter values. [...] === Classifier model (full training set) === weka.classifiers.meta.GridSearch: Classifier: weka.classifiers.functions.SMOreg -C 1000.0 -N 0 -I "weka.classifiers.functions.supportVector.RegSMOImproved -T 0.001 -V -P 1.0E-12 -L 0.001 -W 1" -K "weka.classifiers.functions.supportVector.RBFKernel -C 250007 -G 0.01" X property: C Y property: kernel.gamma Evaluation: Correlation coefficient Coordinates: [3.0, -2.0] Values: 1000.0 (X coordinate), 0.01 (Y coordinate) [...] If you are performing cross-validation, then it is a good idea to check whether the parameters vary wildly within the splits. For that purpose, check "Output models for training splits" in the "More options" dialog in the Explorer. Alternatively, you can also set a log file to get detailed information on the grid evaluation process (and gnuplot output for plotting the performance landscape). However, you will have to convert the coordinates of the "Final result" output into actual parameter values using the expressions that you defined for X and Y. Since this log is always appended, you need to delete it before each run (or use a different name for each run). Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, Hamilton, NZ Mobile +64 22 190 2375 https://www.cs.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/ _______________________________________________ Wekalist mailing list -- [email protected] Send posts to [email protected] To unsubscribe send an email to [email protected] To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html