上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 53 下一页
摘要: 代码: 1 # -*- coding: utf-8 -*- 2 import numpy as np 3 import matplotlib.pyplot as plt 4 import matplotlib as mpl 5 mpl.rcParams['font.sans-serif'] = [' 阅读全文
posted @ 2020-04-05 19:03 博二爷 阅读(823) 评论(0) 推荐(0) 编辑
摘要: 因为注释给的很详细,所以直接给代码: 1 from PIL import Image 2 import numpy as np 3 # 二值化处理 4 5 6 def 二值化处理(image): 7 for i in range(1, 5): 8 # 灰度图 9 lim = image.conver 阅读全文
posted @ 2020-04-03 23:58 博二爷 阅读(964) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 # -*- coding:utf-8 -*- 2 3 import numpy as np 4 import math 5 6 7 # 相关度 8 def computeCorrelation(X, Y): 9 xBar = np.mean(X) 10 yBar = np.mean(Y) 阅读全文
posted @ 2020-03-30 00:13 博二爷 阅读(662) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 # -- coding: gbk -- 2 from sklearn.datasets import load_breast_cancer 3 from sklearn.model_selection import train_test_split 4 import pandas as 阅读全文
posted @ 2020-03-28 00:07 博二爷 阅读(750) 评论(0) 推荐(0) 编辑
摘要: 直接给代码: 1 # -- coding: gbk -- 2 from sklearn.datasets import load_breast_cancer 3 from sklearn.tree import DecisionTreeClassifier 4 from sklearn.model_ 阅读全文
posted @ 2020-03-26 23:58 博二爷 阅读(486) 评论(0) 推荐(0) 编辑
摘要: 注释很清楚: 1 import tensorflow as tf 2 import os 3 import numpy as np 4 import matplotlib.pyplot as plt 5 os.environ["CUDA_VISIBLE_DEVICES"]="0" 6 learnin 阅读全文
posted @ 2020-03-26 12:44 博二爷 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 解析在注释里: 1 import tensorflow as tf 2 from tensorflow.examples.tutorials.mnist import input_data 3 import os 4 os.environ["CUDA_VISIBLE_DEVICES"]="0" 5 阅读全文
posted @ 2020-03-26 12:43 博二爷 阅读(596) 评论(0) 推荐(0) 编辑
摘要: pip源的更改: pip的默认源在国外,pip install some_packages特别慢,经常会超时,导致安装失败; pip 更换为国内的镜像 一:使用方法: ①临时使用: 1 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple “ 阅读全文
posted @ 2020-03-25 21:51 博二爷 阅读(3596) 评论(2) 推荐(0) 编辑
摘要: 代码: # -- coding: gbk -- from sklearn.datasets import load_breast_cancer from pylab import * from sklearn.model_selection import train_test_split from 阅读全文
posted @ 2020-03-24 23:54 博二爷 阅读(837) 评论(0) 推荐(0) 编辑
摘要: 因为注释已经很详细了,所以直接上代码: 1 # -- coding: gbk -- 2 import mglearn 3 from pylab import * 4 from sklearn.model_selection import train_test_split 5 mpl.rcParams 阅读全文
posted @ 2020-03-24 23:15 博二爷 阅读(506) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 53 下一页