一、综述: import matplotlib.pyplot as plt 实例: 二、plot()函数 三、pyplot的中文显示 实例: 四、文本显示 五、子绘图区域 ...
分类:
其他好文 时间:
2020-03-14 17:07:14
阅读次数:
59
一. 二维数据曲线图1.1 绘制二维曲线的基本函数1.plot()函数 plot函数用于绘制二维平面上的线性坐标曲线图,要提供一组x坐标和对应的y坐标,可以绘制分别以x和y为横、纵坐标的二维曲线。 例: t=0:0.1:2*pi; x=2 * t; y=t.*sin(t).*sin(t); plot ...
分类:
其他好文 时间:
2020-03-11 10:48:56
阅读次数:
85
Python代码实现 一·分类模型 1.sklearn.metrics中包含常用的评价指标: #准确率 accuracy_score(y_true, y_pred, normalize=True, sample_weight=None) 参数: y_true :验证集 y_pred :分类器的返回值 ...
分类:
其他好文 时间:
2020-03-09 20:59:43
阅读次数:
85
在本地找了jpg的图,convert为不同mode,将不同的图截取做了个脑图,有个直观的感觉吧。 把不同mode的图通过np.array()转化为array, 打印出array的shape, 和array[0, 0]的值, 便于理解不同mode的通道和像素值的存储。 1 部分结果见下: 2 部分代码 ...
分类:
其他好文 时间:
2020-03-06 22:21:42
阅读次数:
83
一、折线图 import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2 * np.pi, 100) y1, y2 = np.sin(x), np.cos(x) plt.plot(x, y1, c='r', ls='- ...
分类:
编程语言 时间:
2020-03-04 22:45:55
阅读次数:
81
上篇讲到 pyinstaller打包exe太大的问题 CodingDog:pyinstaller打包的exe太大?你需要嵌入式python玄学 前提篇?zhuanlan.zhihu.com 那既然pyinstaller这么麻(nan)烦(yong) 那为什么不找一种方法代替它呢? 经过多方面打听,一 ...
分类:
编程语言 时间:
2020-03-04 14:54:37
阅读次数:
152
画三维柱状图 datafilename = 'experiments_for_different_alpha_beta_J_results_c70.txt'; full_data = load(datafilename); J_plot = reshape(full_data(:,3),8,8); ...
分类:
其他好文 时间:
2020-03-02 10:39:10
阅读次数:
71
clear all; close all; clc; addpath('../data'); addpath('../util'); load mnist_uint8; train_x = double(reshape(train_x',28,28,60000))/255; test_x = dou ...
分类:
其他好文 时间:
2020-03-01 14:51:27
阅读次数:
82
Generative Adversarial Networks Throughout most of this book, we have talked about how to make predictions. In some form or another, we used deep neur ...
分类:
其他好文 时间:
2020-02-23 23:59:04
阅读次数:
93
【机器学习】算法原理详细推导与实现(六):k means算法 之前几个章节都是介绍有监督学习,这个章节介绍无监督学习,这是一个被称为 的聚类算法,也叫做 k均值聚类算法 。 聚类算法 在讲监督学习的时候,通常会画这样一张图: 这时候需要用 回归或者 将这些数据分成正负两类,这个过程称之为 监督学习 ...
分类:
编程语言 时间:
2020-02-23 11:14:20
阅读次数:
85