Optimising a function with multiple inputs

Hi everyone.
I have written a function to detect outliers in data sets based on tresholds defined by relative and absolute tolerances (tol_tr, tol_ta)
[outlier_detected]= find_out(outlied_n, TLE1.Frac_year, gap_start1, gap_end1,sample,tol_tr,tol_ta);
f_n = length(setdiff(x_out,out_detected))/nr_out; % normalized quantity of false negatives
f_p =length(setdiff(out_detected,x_out))/(length(outlied_n)-nr_out); % normalized quantity of false positives
rad=sqrt(f_n^2+f_p^2); % distance from origin
An outlier is detected if two quantities inside the find_out function are above the tol_tr and tol_ta. f_n is the quantity of missed outlier and f_p is the quantity of false outliers.I want to find the best tol_tr and tol_ta, to minimise the f_n and f_p. The best solution is the one closer to origin, so rad is expected to be minimized. Would be thankful for some help

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Chemistry 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by