首页 > 编程知识 正文

python怎么输出roc曲线,ROC曲线代码

时间:2023-05-06 02:45:43 阅读:22427 作者:438

基本sydfn

precision-recallcurvessummarizethetrade-offbetweenthetruepositiverateandthepositivepredictivevalueforapredictivemodelusing

precision-recall curves 3360 imbalanced数据集。

预处理可移植性

In a classification problem,wemaydecidetopredicttheclassvaluesdirectly.alternately, itcanbemoreflexibletopredicttheprobability itcanprovidethecapabilitytochooseandevencalibratethethethreshowtointerpretheppabilitytthephetophetytothos

twotypesoferrorswhenmakingapredictionforabinary/two-classclassificationproblem 3360

fn : predictnoeventwhentherewasanevent

acommonwaytocomparemodelsthatpredictprobabilitiesfortwoclassesistousearoccurve。

sensitvity : truepositiverate=TP/(yqdbdfn ) )。

假定位速率=Fp/(舒适画笔)=1-特定

规格=TN /舒适的画笔

accuracy=(TPTN )/(yqdbdTN FP FN ) )。

recall=TP/(TP FP )

presicion and recall are trade off。

if we want to cover more sample,then it ' seasiertomakemistakes-high recall-low precision

ifwehaveconcernedmodel-low recall-high precision

smallervaluesonthex-axisoftheplotindicatelowerfalsepositivesandhighertruenegatives。

largervaluesonthey-axisoftheplotindicatehighertruepositivesandlowerfalsenegatives

when we predict a binary outcome,itiseitheracorrectprediction (true position ) or not (false positive ).thereisatensionbetweeenthen

askilfulmodelwillassignahigherprobabilitytoarandomlychosenrealpositiveoccurrencethananegativeoccurrenceonaverage.thisiswhatwhatwer lhasskill.generally,skilfulmodelsarerepresentedbycurvesthatbowuptothetopleftoftheplot。

ano-skillclassifierisonethatcannotdiscriminatebetweentheclassesandwouldpredictarandomclassoraconstantclassinallcases.amode epoint (0.5,0.5 ).amodelwithnoskillateachthresholdisrepresentedbyadiagonallinefromthebottomleft

amodelwithperfectskillisrepresentedatapoint (0,1 ).amodelwithperfectskillisrepresentedbyalinethattravelsfromthebotttomleftomlefteftefttttom

anoperatormayplottheroccurveforthefinalmodelandchooseathresholdthatgivesadesirablebalancebetweeenthefalsepositivesandfalsenegatategatatation

控制召回和修复。

recall-risk-sensitivity-truepositiverate的希望是1

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。