フィルターのクリア

How to customize the performance function (mse) to RMSE in AAN?

2 ビュー (過去 30 日間)
Kwaku Owusu
Kwaku Owusu 2021 年 11 月 19 日
回答済み: KALASH 2024 年 5 月 3 日
How to customize the performance function (mse) (net.performFcn = 'mse') in AAN? For example to chane mse to RMSE.
Thank you.

回答 (1 件)

KALASH
KALASH 2024 年 5 月 3 日
Hi Kwaku,
To change the performance function, you must implement a custom performance function to evaluate the performance as “net.performFcn”does not provide option for custom function . Thus, you cannot directly integrate it as “net.performFcn” expects the functions to be predefined . Hence you can evaluate the performance using your own custom function as shown below:
function rmse = calculateRMSE(targets, outputs)
mse = mean((targets - outputs).^2, 'all'); % Calculate MSE
rmse = sqrt(mse); % Calculate RMSE from MSE
end
outputs = net(inputs); % Get the network's outputs for the input data
rmse = calculateRMSE(targets, outputs); % Calculate RMSE using your custom function
For more information on net.performFcn refer below:
Hope this helps!
Best regards,
Kalash

カテゴリ

Help Center および File ExchangeThermal Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by