当前位置: 首页 > news >正文

郑州有做彩票网站的吗江苏搜索引擎优化

郑州有做彩票网站的吗,江苏搜索引擎优化,网站专属定制高端网站建设,和黑人做网站一、条形图 使用场景:对多个实验方法的性能进行比较。代码: #条形图 import matplotlib.pyplot as plt import numpy as np#实验数据,每一行代表一个method,每一列代表一个性能指标 dataacc [[0.9504, 0.9315, 0.9420, 0.9409]…

一、条形图

  1. 使用场景:对多个实验方法的性能进行比较。
  2. 代码:
#条形图
import matplotlib.pyplot as plt
import numpy as np#实验数据,每一行代表一个method,每一列代表一个性能指标
dataacc = [[0.9504, 0.9315, 0.9420, 0.9409],[0.9223, 0.9231, 0.9314, 0.9220],[0.8926, 0.9005, 0.9075, 0.9197]]#横坐标的标签
tick_label=["Accuracy", "Precision", "Recall", "F1-score"]
x = np.arange(4)
#设置字体
plt.rcParams['font.sans-serif'] = ['Times New Roman']
plt.rcParams['axes.unicode_minus']=False
#字体大小
fs = 17
#设置画布大小
fig = plt.figure(figsize=(6, 4))
#绘制图形
plt.bar(x-0.125, dataacc[0], width = 0.125, color='white', edgecolor='red', hatch='//',zorder = 0, label = "method1")
plt.bar(x, dataacc[1], width = 0.125, color='white', hatch='\\\\', edgecolor='green',zorder = 0, label = "method2")
plt.bar(x+0.125, dataacc[2], width = 0.125,  color='white', hatch='--', edgecolor='blue',zorder = 0, label = "method3")
#设置纵坐标起始和终止数值
plt.ylim((0.75, 1))
plt.tick_params(labelsize=fs-2)
plt.grid(True, linestyle='--', alpha=0.5)
#设置图例,loc设置位置,ncol设置列数
plt.legend(loc = 1 ,ncol=3,fontsize=fs-4)
plt.xticks(x,tick_label)plt.xlabel("matrics",fontsize=fs)
plt.ylabel("performance", fontsize=fs)
#保存图形为pdf
plt.savefig('../bar_pic.pdf', format='pdf', dpi=400, bbox_inches='tight')

在这里插入图片描述

二、折线图

  1. 使用场景:对比趋势
  2. 代码:
#折线图
import matplotlib.pyplot as pltdata = [[0.9840, 0.9741, 0.9845],[0.9631, 0.9386, 0.9428],[0.9387, 0.9051, 0.9142],[0.9030, 0.8835, 0.8744],[0.8950, 0.8424, 0.8696]] 
plt.rcParams['font.sans-serif'] = ['Times New Roman']
plt.rcParams['axes.unicode_minus']=Falsefig = plt.figure(figsize=(5, 4))
fs = 17
lw = 1.5ax1 = fig.add_subplot(111)
ax1.plot(["1.0", "2.0", "3.0", "4.0", "5.0"], [x[0] for x in data], c = "black", marker='+', linewidth=lw, label = "method1")
ax1.plot(["1.0", "2.0", "3.0", "4.0", "5.0"], [x[1] for x in data], c = "brown", marker='o', linewidth=lw, label = "method2")
ax1.plot(["1.0", "2.0", "3.0", "4.0", "5.0"], [x[2] for x in data], c = "darkviolet", marker='v', linewidth=lw, label = "method3")ax1.set_ylim([0.7, 1])
ax1.tick_params(labelsize=fs-2)
ax1.set_ylabel('Accuracy', fontsize=fs)
ax1.set_xlabel('Time', fontsize=fs)plt.grid(True, linestyle='--', alpha=0.5)
plt.legend(loc = 0 ,fontsize=fs-2)plt.savefig('../line_pic.pdf', format='pdf', dpi=1200, bbox_inches='tight')

在这里插入图片描述

三、箱线图

  1. 使用场景:显示数据分散情况的统计图。
  2. 代码:
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
#箱线图x = [data1,data2,data3,data4]plt.boxplot(x,widths=0.6,flierprops={"marker": "*", "markerfacecolor": "red","markeredgecolor":"none","markersize":"5"},labels=['Training set URL','Training set embedding','Testing set URL','Testing set embedding'])
# 添加标题和标签
plt.grid(linestyle="--", alpha=0.3)
plt.savefig('../box_pic.pdf', format='pdf', dpi=1200, bbox_inches='tight')
http://www.ds6.com.cn/news/91723.html

相关文章:

  • 网站关键词推广方案安装百度到桌面
  • 一级a做爰片凤凰网站解释seo网站推广
  • 网站备案 法人身份证今日国内新闻10则
  • 合肥大型网站制怎么在百度上做广告
  • 云服务器ecs做网站sem公司
  • 美的公司网站建设的目的青岛网站关键词优化公司
  • 做视频用的网站有哪些正规的培训学校
  • 怎么做一个动态网站吗seo北京网站推广
  • 萍乡网站建设公司信息流广告投放渠道
  • 赣州网站设计哪里好电商网站建设
  • 一个做网站的公司年收入真正永久免费的建站系统有哪些
  • 沈阳网约车公司重庆百度整站优化
  • wordpress 页面固定外贸网站seo
  • 合肥最好的网站建设公司排名网络推广深圳有效渠道
  • 贵阳有哪家做网站建设好点的广告推广平台网站
  • 网站建设起到计划和指导作用营销管理系统
  • 厦门市城乡建设局网站河北网站推广
  • 静安西安网站建设青岛网站建设方案优化
  • 网站开发的软件环境有哪些百度推广客服
  • 余姚做网站62752762目前好的推广平台
  • 营销网站建设培训知名的建站公司
  • 优化师是做什么的seo优化的优点
  • 北京做网站公司的排名搜索图片
  • b站做简介的网站鞋子软文推广300字
  • 北京建站模板企业seo网站优化公司
  • 电子商务网站设计分析怎么做免费的电脑优化软件
  • 工作人员否认陈道明演庆余年2seo刷排名工具
  • 浅谈学校网站建设seo包括什么
  • 网站个人和企业有什么区别灰色关键词快速排名
  • 广州英文网站建设谷歌搜索引擎网址