学习笔记10—Python 绘图集
ordered_data = np.load('ordered_data_just_TD_mae.npy')
results = pd.Series(np.squeeze(np.load('results_just_TD_mae.npy')))
sigma = pd.Series(np.squeeze(np.load('sigma_just_TD_mae.npy')))
print(np.argmin(results[1:80]))
print(np.min(results[1:80]))
x = np.linspace(0,80,80)
plt.plot(x,results,label = 'MAE')
plt.hold(True)
plt.fill_between(x,results-sigma,results+sigma,alpha=0.5, edgecolor='#CC4F1B', facecolor='#FF9848')
plt.annotate('',xy = (np.argmin(results[1:80]),results[np.argmin(results[1:80])]), xytext = (np.argmin(results[1:80]),3+results[np.argmin(results[1:80])]), arrowprops=dict(facecolor='red',shrink=20))
plt.text(np.argmin(results[1:80])-6,(results[np.argmin(results[1:80])]-1),r'MAE = %.2f'%results[np.argmin(results[1:80])],fontsize = 10)
plt.text(np.argmin(results[1:80])-5,(results[np.argmin(results[1:80])]+3.5),r'K = %d'%np.argmin(results[1:80]),fontsize = 10)
plt.xlabel('number of descriptors (K)')
plt.ylabel('MAE (years)')
plt.legend(['TD Data'], loc = 2, ncol = 1) # loc = 1 represent right, loc = 2 represent left, ncol = 1 represent 1 column
学习笔记10—Python 绘图集的更多相关文章
- 【学习笔记】Python 3.6模拟输入并爬取百度前10页密切相关链接
[学习笔记]Python 3.6模拟输入并爬取百度前10页密切相关链接 问题描述 通过模拟网页,实现百度搜索关键词,然后获得网页中链接的文本,与准备的文本进行比较,如果有相似之处则代表相关链接. me ...
- Python3+Selenium3+webdriver学习笔记10(元素属性、页面源码)
#!/usr/bin/env python# -*- coding:utf-8 -*-'''Selenium3+webdriver学习笔记10(元素属性.页面源码)'''from selenium i ...
- 学习笔记之Python 3
学习笔记之Python 3 教程 https://www.cnblogs.com/pegasus923/p/7624416.html 学习笔记之X分钟速成Python3 https://www.cnb ...
- Noah的学习笔记之Python篇:命令行解析
Noah的学习笔记之Python篇: 1.装饰器 2.函数“可变长参数” 3.命令行解析 注:本文全原创,作者:Noah Zhang (http://www.cnblogs.com/noahzn/) ...
- Noah的学习笔记之Python篇:函数“可变长参数”
Noah的学习笔记之Python篇: 1.装饰器 2.函数“可变长参数” 3.命令行解析 注:本文全原创,作者:Noah Zhang (http://www.cnblogs.com/noahzn/) ...
- Noah的学习笔记之Python篇:装饰器
Noah的学习笔记之Python篇: 1.装饰器 2.函数“可变长参数” 3.命令行解析 注:本文全原创,作者:Noah Zhang (http://www.cnblogs.com/noahzn/) ...
- thinkphp学习笔记10—看不懂的路由规则
原文:thinkphp学习笔记10-看不懂的路由规则 路由这部分貌似在实际工作中没有怎么设计过,只是在用默认的设置,在手册里面看到部分,艰涩难懂. 1.路由定义 要使用路由功能需要支持PATH_INF ...
- 《C++ Primer Plus》学习笔记10
<C++ Primer Plus>学习笔记10 <<<<<<<<<<<<<<<<<&l ...
- SQL反模式学习笔记10 取整错误
目标:使用小数取代整数 反模式:使用Float类型 根据IEEE754标识,float类型使用二进制格式编码实数数据. 缺点:(1)舍入的必要性: 并不是所有的十进制中描述的信息都能使用二进制存储,处 ...
随机推荐
- 使用Selenium和openCV对HTML5 canvas游戏进行自动化功能测试(一)
上一篇讲了HTML5 canvas游戏的基本工作原理,接下来讲如何进行自动化功能测试. Selenium是一个跨平台的跨浏览器的对网页进行自动化测试的工具.从Selenium 2.0开始Seleniu ...
- linux操作文件和文件夹
rm filerm -rf folder如将/test1目录下的file1复制到/test3目录,并将文件名改为file2,可输入以下命令:cp /test1/file1 /test3/file2 如 ...
- Forword(请求转发)与Redirect(重定向) 区别
1.从数据共享上 Forword是一个请求的延续,可以共享request的数据 Redirect开启一个新的请求,不可以共享request的数据 2.从地址栏 Forword转发地址栏不发生变化 Re ...
- c++ kafka 客户端rdkafka报Receive failed: Disconnected问题原因以及解决方法
%3|1538976114.812|FAIL|rdkafka#producer-1| [thrd:kafka-server:9092/bootstrap]: kafka-server:9092/0: ...
- oracle 12.2 linux/solaris正式发布
oracle 12.2 linux/solaris正式发布,可以从http://www.oracle.com/technetwork/database/enterprise-edition/downl ...
- Microsoft Visual Studio 2010(vs10)安装与使用
安装1.下载软件: 云盘分享http://pan.baidu.com/s/1i4JL9GT 2.安装 打开Microsoft Visual Studio 2010目录,双击setup.exe ,运行 ...
- CocoaPods创建自己的公开库、私有库
http://www.cocoachina.com/ios/20180308/22509.html
- How to install Maven on Windows
To install Apache Maven on Windows, you just need to download the Maven’s zip file, and Unzip it to ...
- topcoder srm 525 div1
problem1 link 最后剩下的是中间的一个矩形.所以可以直接枚举这个矩形,如果它含有的硬币个数等于$K$,则再计算移动的最少次数,更新答案. problem2 link 首先,每个节点发送每种 ...
- topcoder srm 680 div1
problem1 link 将限制按照$x$排序.那么$[upTo_{i}+1,upTo_{i+1}]$中数字个数为$quantity_{i+1}-quantity_{i}$.然后进行动态规划.$f[ ...