![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
作业
learner。。
这个作者很懒,什么都没留下…
展开
-
LDA推导
LDA推导原创 2021-11-03 20:14:47 · 93 阅读 · 0 评论 -
决策树推导
决策树推导原创 2021-10-26 20:06:23 · 87 阅读 · 0 评论 -
强化学习——Actor Critic Method
强化学习——Actor Critic Methodimport gym, osfrom itertools import countimport paddleimport paddle.nn as nnimport paddle.optimizer as optimimport paddle.nn.functional as Ffrom paddle.distribution import Categoricaldevice = paddle.get_device()env = gym.原创 2021-10-21 16:01:37 · 84 阅读 · 0 评论 -
使用paddle实现手写数字识别
使用paddle实现手写数字识别import paddlefrom paddle.nn import Linearimport paddle.nn.functional as F import osimport numpy as npimport matplotlib.pyplot as pltfrom PIL import Image# 定义mnist数据识别网络结构,同房价预测网络class MNIST(paddle.nn.Layer): def __init__(self)原创 2021-10-19 19:56:44 · 655 阅读 · 0 评论 -
paddle使用卷积神经网络实现图像处理
卷积神经网络图像处理import paddleimport paddle.nn.functional as Ffrom paddle.vision.transforms import ToTensorimport numpy as npimport matplotlib.pyplot as plttransform = ToTensor()cifar10_train = paddle.vision.datasets.Cifar10(mode='train',原创 2021-10-15 23:09:00 · 295 阅读 · 0 评论 -
主成分分析(PCA)
主成分分析(PCA)import numpy as npimport matplotlib.pyplot as pltdata = np.matrix([[2.5,2.4],[0.5,0.7],[2.2,2.9],[1.9,2.2],[3.1,3.0], [2.3,2.7],[2,1.6],[1,1.1],[1.5,1.6],[1.1,0.9]])average = np.mean(data,axis=0)data_adjust = np.zeros((10,原创 2021-10-07 21:10:28 · 84 阅读 · 0 评论 -
隐马尔可夫模型(未完待续...)
隐马尔科夫模型推导代码原创 2021-10-04 22:05:41 · 59 阅读 · 0 评论 -
Euler作业(新)
Euler作业(新)import matplotlib.pyplot as pltimport numpy as npclass Euler(): """新、旧欧拉算法比较""" def __init__(self): self.x = 0.2 self.y = 0.8 self.list_x = [0,0.2,] self.list_y = [1,0.8,] self.h = 0.2 def原创 2021-09-24 16:22:18 · 69 阅读 · 0 评论 -
凉鞋问题之贝叶斯公式
原创 2021-09-17 20:44:32 · 102 阅读 · 0 评论 -
反向传播算法(未完待续......)
反向传播算法公式及推导图1图2原创 2021-09-17 20:33:03 · 61 阅读 · 0 评论 -
Euler作业
用欧拉法解初值问题import matplotlib.pyplot as pltx = 0y = 1xx = [0]yy = [1]h = 0.1for i in range (1,100): y = 1.1*y - 0.2*x/y x = x + h xx.append(x) yy.append(y)for i in range(100): print('%-30s%-20s' %(xx[i],yy[i]))fig = plt.figure()原创 2021-09-16 11:41:38 · 150 阅读 · 0 评论 -
作业:实现感知器
使用python实现感知器from __future__ import print_functionfrom functools import reduceclass VectorOp(object): """ 实现向量计算操作 """ def dot(x, y): """ 计算两个向量x和y的内积 """ # 首先把x[x1,x2,x3...]和y[y1,y2,y3,...]按元素相乘转载 2021-09-10 19:21:33 · 168 阅读 · 0 评论 -
线性回归算法作业
import numpy as npimport matplotlib.pyplot as pltx = np.array([[2104,3],[1600,3],[2400,3],[1416,2],[3000,4]])y = np.array([400,330,369,232,540])alpha = 0.1theta0 = np.random.random()theta1 = np.random.random()theta2 = np.random.random()theta = np.原创 2021-09-03 23:19:45 · 134 阅读 · 0 评论 -
numpy作业
#垂直拆分,水平拆分c = np.arange(1,13).reshape(6,2)#np.reshape()print(c)print(np.vsplit(c,3))#np.vsplit(),垂直拆分d = c.Tprint(d)print(np.hsplit(d,3))#np.hspilt()水平拆分e = np.array([ [[11, 21], [12, 22], [13, 23]], [[14, 24],转载 2021-09-03 22:05:43 · 214 阅读 · 0 评论