可视化
rosefunR
每次都多付出一点. 欢迎关注公众号《机器学习与算法之道》
展开
-
tensorboard可视化高级使用
1、Scalar运行程序时,出错,AttributeError: 'SummaryMetadata' object has no attribute 'display_name' 只有graph图像。 后来,发现这是TensorFlow版本问题。由于,之前装的GPU版本是tensorflow (1.3.0rc0),但是运行tensorboard的时候,没有出现scalar,然后试了升级Tens原创 2017-12-14 21:48:31 · 2982 阅读 · 0 评论 -
pyqt5 label等文字字体设置
1、代码passwdLabel.setFont(QFont("Microsoft YaHei"))设置文字的颜色:lineEdit.setStyleSheet("color:red");//文本颜色 lineEdit.setStyleSheet("background-color:red");//背景色 参考: 1.Qt 设置文本颜色字体...原创 2018-03-07 22:23:08 · 33422 阅读 · 1 评论 -
Pyqt5运行pyqt4各种错误解决方法汇总
1.NameError: name 'QApplication' is not definedfrom PyQt5.QtWidgets import QApplication2.NameError: name 'QLabel' is not definedfrom PyQt5.QtWidgets import *3.NameError: name 'QDialog' is ...原创 2018-03-04 21:43:27 · 11367 阅读 · 0 评论 -
pyqt5 第一个人机交互界面 弹出式闹钟(1)
1.代码#!/usr/bin/env python# Copyright (c) 2007-8 Qtrac Ltd. All rights reserved.# This program or module is free software: you can redistribute it and/or# modify it under the terms of the GNU Ge...原创 2018-03-04 21:46:09 · 1988 阅读 · 0 评论 -
pyqt5 计算器编写(2)
1、代码#!/usr/bin/env python# Copyright (c) 2007-8 Qtrac Ltd. All rights reserved.# This program or module is free software: you can redistribute it and/or# modify it under the terms of the GNU Ge...原创 2018-03-04 22:05:02 · 1487 阅读 · 0 评论 -
pyqt交互界面实现 贝叶斯自动检查单词的实现(3)
1、代码checkword.pyimport re,collectionsdef words(text): return re.findall('[a-z]+', text.lower()) def train(features): model = collections.defaultdict(lambda: 1) for f in features: ...原创 2018-03-05 09:57:26 · 2691 阅读 · 0 评论 -
pyqt5 各模块介绍
1、模块PyQt5的类被分成了多个模块,包括下面的:QtCoreQtGuiQtWidgetsQtMultimediaQtBluetoothQtNetworkQtPositioningEnginioQtWebSocketsQtWebKitQtWebKitWidgetsQtXmlQtSvgQtSqlQtTestQtCore模块包含核心的非GUI功能。该...原创 2018-03-05 10:30:04 · 6759 阅读 · 0 评论 -
pyqt5 编程 复利计算器的编写(4)
1、代码from PyQt5.QtGui import *from PyQt5.QtCore import *from PyQt5.QtWidgets import *import sysclass Form(QDialog): """docstring for """ def __init__(self, parent=None): super(...原创 2018-03-06 13:53:08 · 1106 阅读 · 0 评论 -
python绘图汇总
绪论机器学习,我们一般需要先对数据进行分析,又称EDA( Exploratory Data Analysis ). 分类、回归等问题Eda方法会有所偏差。而EDA一般都是通过绘制图进行展示。本文主要收集常用的Eda方法。1、数据相关性分析import numpyimport matplotlib.pyplot as pltcorrelations = data.corr() #计算变...原创 2018-11-20 16:05:57 · 1964 阅读 · 0 评论 -
ubuntu系统服务器的matplotlib中文乱码问题
方法如果图像中文乱码,无法显示,可以:1、下载中文字体simhei.ttf, 网址为http://fontzone.net/download/simhei ;2、 搜索 matplotlib 字体的安装位置。$locate -b '\mpl-data'使用Xftp 软件上传到服务器相应位置。3、清除缓存。$cd ~/.cache/matplotlib$rm -rf *.*4、...原创 2018-12-26 15:08:22 · 869 阅读 · 0 评论 -
python 可视化汇总
1 混淆矩阵分类经常需用到混淆矩阵来查看各类别分类的效果。#输入:true, pred, 形如 [1,2,1,1]的list或者numpy array。from sklearn.metrics import classification_reportprint(classification_report(true, pred))效果: precision ...原创 2019-03-12 21:05:19 · 824 阅读 · 0 评论 -
matplotlib LaTeX
#!/usr/bin/env python#coding:utf-8""" Author: Chaos --<Chaosimpler@gmail.com> Purpose: 在Matplotlib绘图过程中使用Latex风格的公式 Created: 2014年10月17日"""import matplotlib.pyplot as pltimport nump...原创 2019-06-27 15:32:27 · 723 阅读 · 0 评论 -
PyQt5 设置背景图片和logo
1、代码 def setIcon(self): palette1 = QPalette() # palette1.setColor(self.backgroundRole(), QColor(192,253,123)) # 设置背景颜色 palette1.setBrush(self.backgroundRole(), QBrush(...原创 2018-03-07 22:16:01 · 19641 阅读 · 0 评论 -
标准文件打开保存框 QFileDialog
1、代码from PyQt5 import QtWidgets from PyQt5.QtWidgets import QFileDialog class MyWindow(QtWidgets.QWidget): def __init__(self): super(MyWindow,self).__init__() self.m...原创 2018-03-07 20:59:31 · 613 阅读 · 0 评论 -
python入门系列(14): python对字符串型数据处理
1.sklearn1.1示例1from sklearn import preprocessingle = preprocessing.LabelEncoder()le.fit(df['Col1'])df['Col3'] = le.transform(df['Col3'])1.2 示例2使用独热编码。###2/独热编码from sklearn import preprocessingfrom原创 2017-12-25 08:55:45 · 1036 阅读 · 0 评论 -
python包matplotlib绘图基础入门
1、matplotlibmatplotlib是numpy的扩展,可以实现python框架下的可视化,类似MATLAB的图像可视化。2、基本操作2.1绘画直方图#matplotlib使用import matplotlib.pyplot as pltfrom numpy.random import normal,randx = normal(size=200)plt.hist(x,bins=30原创 2017-12-18 16:02:23 · 1027 阅读 · 0 评论 -
[坑]python数字可视化vpython包
1、vpython安装pip install vpython2、vpython基本使用2.1 查看球体from visual import *sphere()2.2 bounce.py简单实现from visual import *floor = box(length=4, height=0.5, width=4, color=color.blue)ball = sphere(pos=(0,4,0原创 2017-12-26 20:56:47 · 5274 阅读 · 3 评论 -
python数据可视化工具
参考: 1、6种可视化工具原创 2017-12-26 21:36:55 · 758 阅读 · 0 评论 -
python函数图像绘制
1、实现import matplotlib.pyplot as pltimport mathimport numpy as npplt.figure(1)x=[]y=[]a=np.linspace(0,10,100)for i in a: x.append(i) y.append(10 * math.sin(5 * i) + 7 * math.cos(4 * i))plt.p原创 2018-01-11 20:26:44 · 8899 阅读 · 0 评论 -
Pycharm安装与入门
1、pycharm安装官方下载就好。2、JDK安装pycharm需要运行在JDK下,所以,需要下载安装JDK。(存疑,一些教程并没有安装JDK,但是对于学完python将转战Java的来说,还是安装了。)2.1 配置系统环境配置环境变量:右击“我的电脑”–>”高级”–>”环境变量”。(1)JAVA_HOME环境变量。(2)CLASSPATH环境变量。(3)path环境变量具体看参考文献13、使用第一原创 2017-12-22 20:51:15 · 15610 阅读 · 0 评论 -
python skimage图像处理
1、skimageskimage是scikit下的一个包,一般安装好scikit,就可以调用。2、简单示例from skimage import data, io, filtersimage = data.coins()# ... or any other NumPy array!edges = filters.sobel(image)io.imshow(edges)io.show()#sk原创 2018-01-15 11:01:51 · 1216 阅读 · 0 评论 -
python 图形用户界面GUI编写
引言GUI实现的模块: Tkinter: Tkinter 模块(Tk 接口)是 Python 的标准 Tk GUI 工具包的接口 .Tk 和 Tkinter 可以在大多数的 Unix 平台下使用,同样可以应用在 Windows 和 Macintosh 系统里。Tk8.0 的后续版本可以实现本地窗口风格,并良好地运行在绝大多数平台中。 wxPython:wxPython 是一款原创 2018-01-07 10:23:16 · 7986 阅读 · 0 评论 -
python数据可视化包 seaborn
引言python数据可视化的包有很多,目前使用了matplotlib,现在想尝试seaborn。 Seaborn其实是在matplotlib的基础上进行了更高级的API封装,从而使得作图更加容易,在大多数情况下使用seaborn就能做出很具有吸引力的图,而使用matplotlib就能制作具有更多特色的图。 应该把Seaborn视为matplotlib的补充,而不是替代物。参考:数据原创 2018-01-10 15:07:19 · 623 阅读 · 0 评论 -
pyqt5 编写编辑fruit简单界面(5)
1、代码#!/usr/bin/env python# Copyright (c) 2007-8 Qtrac Ltd. All rights reserved.# This program or module is free software: you can redistribute it and/or# modify it under the terms of the GNU Ge...原创 2018-03-07 11:28:13 · 624 阅读 · 0 评论 -
PyQt5 -标准输入框QInputDialog
1、代码from PyQt5 import QtWidgetsfrom PyQt5.QtWidgets import QLineEdit,QInputDialogclass MyWindow(QtWidgets.QWidget): def __init__(self): super(MyWindow,self).__init__() self....原创 2018-03-07 15:16:50 · 2712 阅读 · 0 评论 -
pyqt5 导入.ui .qrc文件格式的方法
1、导入.ui格式首先,代开cmd到.ui文件的位置,然后使用一下命令把.ui 格式转换成 .py 格式pyuic5 -x MyWidget.ui -o MyWidget.py2、导入 .qrc格式同理,类似只是代码是:Pyrcc5 input_file.qrc -o Out_file.py...原创 2018-03-07 15:48:01 · 3668 阅读 · 1 评论 -
论文插图配色与论文英语搭配、辅助阅读论文软件、批量下载参考文献Bibtex格式
参考:github palettable;配色网站 adobe;配色网站 flatuicolors;python 包prettyplotlib;blog 论文制作配图;原创 2019-09-21 16:12:09 · 1016 阅读 · 0 评论