Tuning Random Forest parameters with an optimization strategy (PSO) other than Bayesian Optimization

3 visualizzazioni (ultimi 30 giorni)
Hi! I’m exploring different approach of tuning the Random forest parameters. I started with the Bayesian Optimization approach (https://ch.mathworks.com/help/stats/tune-random-forest-using-quantile-error-and-bayesian-optimization.html), which works perfectly fine.
Then, I tried to repeat the same procedure, but this time, with the PSO optimization algorithm. In this other case, I want to keep using the out-of-bag error function ‘oobErrRF’ (used in the MATLAB example of Bayesian optimization----See the above link) as ‘function to be minimized’.
  1. I can get the code to work, especially due to the error “Undefined function or variable 'params'.”
  2. I suspected that this error is due to “Calling an object method without an object as the first input” (https://ch.mathworks.com/matlabcentral/answers/96005-why-do-i-get-the-error-undefined-function-or-variable).
  3. But still, I failed to solve this issue. the “params” here seems to be specific (embedded) within the error function and the Bayesian optimization paradigm? How can I solve this problem?
  4. How can I define (extract) the “params” for a "PSO optimization" while keep using the ‘oobErrRF’ function?
The code is provided for a clearer understanding of my problem. Thank you for your precious help.

Risposte (0)

Prodotti


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by