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 绘图集的更多相关文章

  1. 【学习笔记】Python 3.6模拟输入并爬取百度前10页密切相关链接

    [学习笔记]Python 3.6模拟输入并爬取百度前10页密切相关链接 问题描述 通过模拟网页,实现百度搜索关键词,然后获得网页中链接的文本,与准备的文本进行比较,如果有相似之处则代表相关链接. me ...

  2. Python3+Selenium3+webdriver学习笔记10(元素属性、页面源码)

    #!/usr/bin/env python# -*- coding:utf-8 -*-'''Selenium3+webdriver学习笔记10(元素属性.页面源码)'''from selenium i ...

  3. 学习笔记之Python 3

    学习笔记之Python 3 教程 https://www.cnblogs.com/pegasus923/p/7624416.html 学习笔记之X分钟速成Python3 https://www.cnb ...

  4. Noah的学习笔记之Python篇:命令行解析

    Noah的学习笔记之Python篇: 1.装饰器 2.函数“可变长参数” 3.命令行解析 注:本文全原创,作者:Noah Zhang  (http://www.cnblogs.com/noahzn/) ...

  5. Noah的学习笔记之Python篇:函数“可变长参数”

    Noah的学习笔记之Python篇: 1.装饰器 2.函数“可变长参数” 3.命令行解析 注:本文全原创,作者:Noah Zhang  (http://www.cnblogs.com/noahzn/) ...

  6. Noah的学习笔记之Python篇:装饰器

    Noah的学习笔记之Python篇: 1.装饰器 2.函数“可变长参数” 3.命令行解析 注:本文全原创,作者:Noah Zhang  (http://www.cnblogs.com/noahzn/) ...

  7. thinkphp学习笔记10—看不懂的路由规则

    原文:thinkphp学习笔记10-看不懂的路由规则 路由这部分貌似在实际工作中没有怎么设计过,只是在用默认的设置,在手册里面看到部分,艰涩难懂. 1.路由定义 要使用路由功能需要支持PATH_INF ...

  8. 《C++ Primer Plus》学习笔记10

    <C++ Primer Plus>学习笔记10 <<<<<<<<<<<<<<<<<&l ...

  9. SQL反模式学习笔记10 取整错误

    目标:使用小数取代整数 反模式:使用Float类型 根据IEEE754标识,float类型使用二进制格式编码实数数据. 缺点:(1)舍入的必要性: 并不是所有的十进制中描述的信息都能使用二进制存储,处 ...

随机推荐

  1. Linux学习笔记之CentOS7配置***SS

    0x00 概述 最近安装K8S,镜像在国内不可达,只能通过科学方法获取. 0x01 安装配置Shadowsocks客户端 1.1 安装Sha.dows.ocks客户端 安装epel扩展源 采用Pyth ...

  2. mysql常用的操作命令

    在mysql中以半角分号;作为命令的结束符 查看当前系统包含的数据库:mysql> show databases [like ' ']; 从一个数据库切换到另一个:mysql>use ol ...

  3. Linux Redhat 安装免费yum源

    Linux Redhat 安装免费yum源 出处地址:http://www.cnblogs.com/nbartchen/p/8565816.html 1.查看是否安装相关包 rpm -qa|grep ...

  4. 树莓派安装cobbler,自动化安装CentOS

    安装python.相关python模块.apache sudo apt-get install python python2.7 python-django python-netaddr python ...

  5. oracle 12c AUTO_SAMPLE_SIZE动态采用工作机制

    The ESTIMATE_PERCENT parameter in DBMS_STATS.GATHER_*_STATS procedures controls the percentage of ro ...

  6. C# 发送16进制串口数据

    一个困扰两天的问题:需要通过串口向设备发送的数据:0A010 7e 08 00 11 00 00 7e 76 7f我先将每个16进制字符转换成10进制,再将其转换成ASCII码对应的字符. /// & ...

  7. 思维导图软件 xMind 基本用法

    官方下载:https://www.xmind.net/download/win/ 官方快捷键说明:https://www.xmind.net/blog/cn/tag/xmind%EF%BC%8C%E5 ...

  8. 神秘的.user.ini文件

    原文链接:https://segmentfault.com/a/1190000011552335

  9. VC++ 判断一个文件是不是快捷方式

    转载:https://bbs.csdn.net/topics/34999 #include <iostream> #include <Shlobj.h> #include &l ...

  10. 牛客网数据库SQL实战(1-5)

    1.查找最晚入职员工的所有信息 CREATE TABLE `employees` ( `emp_no` int(11) NOT NULL, `birth_date` date NOT NULL, `f ...