Exporting Best Fitness Variables from Surrogate Algorithm

조회 수: 6 (최근 30일)
Mirhan
Mirhan 2025년 4월 16일
댓글: Mirhan 2025년 4월 18일
Hi all,
I’m trying to export only the best fitness variables (5 variables) from a surrogate optimization algorithm. Currently, I’m able to export the variables at each generation, but I would like to export only those that correspond to an improvement in the best fitness value.
Since the best value doesn’t necessarily change at every generation, I’d prefer to save only the variables when a new best is found.
Does anyone know how to implement this or have a suggestion for tracking and exporting only the best-performing variables throughout the optimization?
Best regards,
Mirhan

채택된 답변

Matt J
Matt J 2025년 4월 17일
  댓글 수: 1
Mirhan
Mirhan 2025년 4월 18일
Dear Matt,
Thank you for your response. I must have overlooked that—after your message, I checked again, and it seems to give exactly what I need.
That said, I still had to remove the redundant rows using:
x_history_unique = unique(x_history, 'rows');.
Best regards,
Mirhan

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by