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에 대해 자세히 알아보기

태그

질문:

2020년 10월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by