问题描述
我编写了一个函数,用于根据相对公差和绝对公差(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
如果 find_out 函数中的两个数量在 tol_tr 和 tol_ta 之上,则将检测到异常值。 f_n是遗漏的异常值数量,而 f_p 是虚假的异常值数量。我想找到最好的 tol_tr 和 tol_ta ,以最大程度地减少 f_n 和 f_p 。最好的解决方案是更接近原点的解决方案,因此我们希望将 rad 最小化。感谢您的帮助
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)