How can I find the best parameter values to minimize a function

2 ビュー (過去 30 日間)
Vlad Paul
Vlad Paul 2019 年 7 月 17 日
コメント済み: David K. 2019 年 7 月 17 日
Hi,
I have an algorithm that does some source separation and as a performance measurement I implemented a Signal to Noise Ratio. At the beginning of the algorithm I initialize parameters like FFT length, hop size, window type and some other source separation parameters. All these parameters can have different values and the separation depends on these numbers.
Is it possible to define a range/vector of values for each parameter (ex. fftLen=[512 1024 2048], window=[hann blackmann hamming] etc.) and run the algorithm to find the best initialization based on a simple Euclidean distance between optimum SNR and estimated SNR? Even though I found some explanations for other problems, I cannot apply these to my algorithm.
Thank you!

採用された回答

David K.
David K. 2019 年 7 月 17 日
If you do not really care about efficiency and time you can just loop through and try everything yourself.
fftlen = [512 1024 2048];
window = {'','',''};
etc
OutputVals = zeros(totalCombinations)
count = 1;
for fftlen
for window
for etc
OutputVals(count) = Algorithm
end
end
end
Analyze_outputs
In general you want to avoid this sort of thing in Matlab as you can often use multidimensional matrices and such. But with no idea what you are actually doing I just wanted to show the most conceptually simple way.
  2 件のコメント
Vlad Paul
Vlad Paul 2019 年 7 月 17 日
Thank you for the answer. I was thinking about using different for loops, but I know it will take a lot of time. I was thinking of using functions like fminsearch etc., but I am struggling with adapting that function to my need
David K.
David K. 2019 年 7 月 17 日
That is a function included in the optimization app which could make using it easier.
However you would need to turn your algorithm into a function (if it isn't already). But the biggest problem is I do not think it can be given inputs in text. For fftlen it would probably give back some random decimal instead of an exponent of 2.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by