绘制预测曲线

predictiveness-curve的Python项目详细描述


预测性曲线

PyPi versionPython supportLicenseBuild StatuscodecovDownloadsDownloadsDownloads

什么是预测曲线?

预测曲线是同时显示两个图形的一种方法。在这两个数字中,X轴是风险百分位数,一个图的y轴是风险的值,另一个图的y轴是真正分数。这使得我们能够直观地看到风险模型是否适合医学领域,以及应该使用哪个风险值作为模型的基础。有关详细信息,请参见Am. J. Epidemiol. 2008; 167:362–368

安装

此模块实现绘制Predictiveness Curve的函数。
安装时使用:

pip install predictiveness-curve

示例

frompredictiveness_curveimportplot_predictiveness_curvefromsklearn.datasetsimportload_breast_cancerfromsklearn.ensembleimportRandomForestClassifierfromsklearn.model_selectionimporttrain_test_splitdata=load_breast_cancer()y=data.targetX=data.datatraining_X,test_X,training_y,test_y=train_test_split(X,y,test_size=0.5,random_state=42)clsf=RandomForestClassifier(n_estimators=100,random_state=42)clsf.fit(training_X,training_y)probabilities=clsf.predict_proba(test_X)[:,1]plot_predictiveness_curve(probabilities,test_y)

详见notebooks directory

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为什么运行这么长时间?   具有多行插入的java Quarkus Hibernate/Panache NativeQuery   强力创建类并将其添加到数组中会导致奇怪的结果   java将KeyListener添加到Jframe问题   java简单Spring EL表达式不起作用;带有错误类型失配异常   java中求偶数整除数的有效方法   java静态方法和实例方法的内存表示之间的差异   Java 8 LocalDateTime到日期丢失时区   如何在Java中以编程方式创建XML文档?   Hyperledger结构智能合约中的java如何打开日志记录?   java关键帧动画   单击TableRowSorter时,java获取所选行中的用户对象   java Android应用程序挂起   JAVAlang.AbstractMethodError:org。jboss。资源适配器。jdbc。jdk5。WrappedConnectionJDK5。createBlob()Ljava/sql/Blob;   调用java类表单velocity模板(.vt)文件   java Struts |类型转换错误