- 博客(13)
- 问答 (3)
- 收藏
- 关注
原创 Python用log文件绘制损失、准确率曲线
一、导入包from matplotlib import rcParamsimport matplotlib.pyplot as pltimport re二、读取文件##显示中文rcParams['font.family'] = 'sans-serif'rcParams['font.sans-serif'] = 'SimSun,Times New Roman'##读取log文件logFile = r'...\log-20210818-090024.log' text = ''file
2021-08-19 10:28:11
3688
转载 PLS-DA中的LV(潜在变量)数量
潜在变量数量就是降维后的数量参考:https://nirpyresearch.com/pls-discriminant-analysis-binary-classification-python/欢迎指正!
2021-01-18 16:46:37
2515
原创 python分割字符串,提取字符串那里面的数字
source ="1,2,3,4,5,6"print(source.split(',')[-1]) ##6a = '传感器1电阻值:123K,传感器1电压值:456K,传感器2电阻值:789K,传感器2电压值:000K,'# print(a.split(":")[1].split("K")[0])a1 = a.split(",")[0].split(":")[1].split("K")[0]print(a1) #123a2 = a.split(",")[1].split(":")[1].s
2021-01-07 16:54:20
1633
1
原创 Pytorch使用GPU/CPU处理电子鼻数据
数据:链接:https://pan.baidu.com/s/1ZH3T22IP3S34Am1uj2UERw提取码:jqna复制这段内容后打开百度网盘手机App,操作更方便哦一、自己写的网络1、CPU运行代码import torchimport torch.nn as nnimport torch.optim as optimfrom torchvision import datasets, transforms, modelsfrom torch.utils.data import Dat
2020-10-26 13:15:17
861
1
原创 Seaborn和Matplotlib对多类数据进行可视化并添加图例
import numpy as npimport pandas as pdimport matplotlibimport matplotlib.pyplot as pltimport seaborn as sns#matplotlib默认不显示中文font = {'family':'MicroSoft YaHei','weight':'bold'}matplotlib.rc('font',**font) #给matplotlib能够显示中文####################.
2020-10-19 22:55:42
1542
1
原创 Numpy将nan、inf替换为每列均值或者0
nan和inf替换成0import numpy as npa = np.array([[np.nan, np.nan, 1, 2], [np.inf, np.inf, 3, 4], [1, 1, 1, 1], [2, 2, 2, 2]])print (a)where_are_nan = np.isnan(a)where_are_inf = np.isinf(a)#nan替换成0,inf替换成nana[where_are_nan] = 0a[where_are_inf] = 0print
2020-10-13 16:20:17
6816
原创 MNIST数据包
MNIST数据包链接:https://pan.baidu.com/s/1DT62bPmMReyEzJYB7Gsj-A提取码:qkvr
2020-08-15 07:45:10
388
原创 FutureWarning: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. Please im
FutureWarning: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. Please import this functionality directly from joblib, which can be installed with: pip install joblib. If this warning is raised when loading pickled models, you ma
2020-06-18 17:43:41
1855
原创 module cv2.cv2 has no attribute xfeatures2d
图像拼接中出现错误:module cv2.cv2 has no attribute xfeatures2d安装contrib,安装之后出现另一错误:module cv2.cv2 has no attribute SIFT_CREAT。先卸载然后重新安装pip uninstall opencv-pythonpip uninstall opencv-contrib-pythonpip ins...
2020-04-09 10:44:11
490
原创 信用卡项目(唐老师)module myutils has no attribute sort contours问题
把课件里的myutils复制到同一个文件夹中
2020-03-26 10:51:30
2518
2
原创 信用卡项目the following arguments are required
昨天下午出现这个问题,到现在才解决。期间找过很多解决方法都不行例:在parameters中添加路径 -tC:\Users\ASUS\Desktop\Python Pratice\Picture\template.png-i C:\Users\ASUS\Desktop\Python Pratice\Picture\c1.png还是会出现报错:unrecognized arguments试过...
2020-03-26 10:16:39
2897
1
空空如也
keras保存交叉验证模型
2021-04-28
keras使用一维数据的注意力机制问题
2021-03-30
TA创建的收藏夹 TA关注的收藏夹
TA关注的人