sklearn-matlab
sklearn-matlab copied to clipboard
which functions i should use?
Hello Steven,
i have collected data in xls file (about 300 values and i will collect more). In my algorithm i am doing edge detection with canny operator. Canny operator has two threshold and i want to implement some of your function to find best threshold for Canny (chose some of 300 values from database). So, i have objective parameter to find best match its FIgure of Merit (FoM). So, i want to check all 300 values and find where is FoM greatest, which your functions i should use?
Your question is not specific enough. Can you calculate FoM for each value?
Your question is not specific enough. Can you calculate FoM for each value?
Yes. For example:
image = imread(pathToImage);
image = rgb2gray(image);``
edgeCanny = edge(image, treshold1, treshold2);
FoM = calculateFom(edgeCanny, refImage); % I have already this function and refImage
So, for threshold1 and treshold2 I already have 300 values and i will collect more. I want to use some of your function to find best values for treshold1 and threshold2 in order to achieve better FoM.
Seems like a problem of hyperparameter tuning. This is often done through grid search, which I haven't implemented yet in this library. You can do a basic grid search with a few lines of Matlab code though.
Alternatively, you can check Matlab's bayesopt algorithm, which is often better than grid search but a little harder to configure. https://www.mathworks.com/help/stats/bayesopt.html
Oh, bayesopt is to hard to configure.
Can you give me example with a few lines of matlab code ?
I don't have any examples that are shorter or easier than the ones on https://www.mathworks.com/help/stats/bayesopt.html I suggest you study those.