필터 지우기
필터 지우기

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

조회 수: 1 (최근 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 CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by