from pandas import Series import numpy as np data = Series(np.random.randn(10), index=[['a','a','a','b','b','b','c','c','d','d'], [1,2,3,1,2,3,1,2,2,3 ...
分类:
其他好文 时间:
2021-02-17 15:05:05
阅读次数:
0
2.EDA/探索性数据分析 2.1 周一到周日每天购买情况 # 导入相关包 %matplotlib inline # 绘图包 import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as p ...
分类:
其他好文 时间:
2021-02-17 14:01:56
阅读次数:
0
# In[1] import pandas as pd import numpy as np import json import os import re # In[2] # !pwd os.chdir('./root/FAQ/') # In[2] with open('./data/all_da ...
分类:
其他好文 时间:
2021-02-05 10:56:21
阅读次数:
0
说明 共用了两种方法进行检测 方法1: 使用opencv的canny进行边缘检测,在此之前先变灰和加入高斯模糊 方法2: 对图片二值化,随后找到关键点,并在空白画板画关键点 代码 import cv2 as cv import numpy as np # 读路径下的图片 img = cv.imrea ...
分类:
其他好文 时间:
2021-02-05 10:53:28
阅读次数:
0
模型正则化 Regularization 岭回归实现 import numpy as np import matplotlib.pyplot as plt np.random.seed(42) x = np.random.uniform(-3.0, 3.0, size=100) X = x.resh ...
分类:
其他好文 时间:
2021-02-04 12:23:51
阅读次数:
0
数据结构 Series Series是一个类似于一维数组的数据结构,它能够保存任何类型的数据,比如整数、字符串、浮点数等,主要由一组数据和与之相关的索引两部分构成。 Series的创建与应用 指定内容,默认索引 a=pd.Series(np.arange(10)) print(a) 输出: 指定内容 ...
分类:
其他好文 时间:
2021-02-02 11:27:43
阅读次数:
0
直观理解高斯核函数 import numpy as np import matplotlib.pyplot as plt x = np.arange(-4, 5, 1) x # array([-4, -3, -2, -1, 0, 1, 2, 3, 4]) y = np.array((x >= -2) ...
分类:
其他好文 时间:
2021-02-01 12:54:14
阅读次数:
0
01.note 一.不用pytorch的module模型手写简单的线性问题 1)输入train_data和test_data #1.输入数据集 inputs = np.array([[73, 67, 43], [91, 88, 64], [87, 134, 58], [102, 43, 37], [ ...
分类:
其他好文 时间:
2021-01-30 12:05:31
阅读次数:
0
import tensorflow as tf import numpy as np ##使用numpy生成100个随机点 x_data=np.random.rand(200) y_data=x_data*0.1+0.2 #构造一个线性模型 b=tf.Variable(0.) k=tf.Variab ...
分类:
编程语言 时间:
2021-01-26 11:55:41
阅读次数:
0
Chapter 7 - Collaborative Analytics with Plotly Segment 2 - Creating statistical charts Setting up to use Plotly within Jupyter import numpy as np imp ...
分类:
编程语言 时间:
2021-01-25 11:18:24
阅读次数:
0