Calculating TN, FN, TP and FP to plot ROC curve

3 次查看(过去 30 天)
I have computed the output power spectral density curve using a matlab code. The output is attached below. Now I wanted to calculate the x axis ranges for which y axis cross the threshold value 0.2 and x axis value remains within the range 150-400 & 1800-2600. This way I think I will be able to calculate true positive for threshold level 0.2.
Any help in this regard will be appreciated.

采纳的回答

Pavel Osipov
Pavel Osipov 2020-2-2
Hi. Let be a spectral density curve as a function of the frequency of ohms:
If om and Pow are numeric arrays (of the same length) of [150-400] and [1800-2600], then
Pow=Pow(om); Pow 1=Pow-0.2;
The desired points are zeros of the Pow1 function. This feature is nice, smooth, and won't
you can approximate it in the Curve Fitting Toolbox. Get ApproPow(om)
- a continuous function of its argument.
Next: omStar=fzero(Apropos, omNearOmStar);
omNearOmStar is a certain point in the neighborhood of exactly unknown
zero of the Pow1 function. Repeat this procedure 4 times.
If you execute this method in the form of routines that can be done automatically.
There are many methods for solving Your problem.
It is better to solve this problem in Symbolic Toolbox-it is simple and more beautiful.

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by