![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
tt01_18
这个作者很懒,什么都没留下…
展开
-
2020-11-25
#BP实现## #made by wanghanpu##import numpy as npimport mathimport randomInputNum = 2HiddenNum = 3OutputNum = 2#实现数据点的定义class Node: def __init__(self,Number): #该节点的值 self.value = 0 #随机初始化的权重 #nd.arange(4)....原创 2020-11-25 09:08:43 · 86 阅读 · 0 评论 -
matplotlib的学习
import matplotlib.pyplot as pltfrom matplotlib.collections import EventCollectionimport numpy as np# Fixing random state for reproducibilitynp.random.seed(19680801)# create random dataxdata = ...转载 2020-03-10 19:46:17 · 160 阅读 · 0 评论 -
Python入门
#基数print(0b10)#输出2进制数print(0o10)#输出8进制数#类型转换print(int(True))print(int(False))print(int(98.6))#字符串,Python字符串是不可变的#1.字符串的创建,双引号也可以创建字符串,多用于创建的字符串中含引号,三元引号用于创建多行字符串print('tt转载 2018-02-02 23:41:47 · 240 阅读 · 0 评论 -
Python入门
#*完成字符串复制start = 'Na'*4+'\n'middle = 'Hey'*3+'\n'end = 'Goodbye.'print(start+start+middle+end)#使用[]提取字符串##name = 'Henny'##name.replace('H','P')##'Penny'##'P'+name[1:]##'pe转载 2018-02-03 22:56:06 · 447 阅读 · 0 评论 -
Python列表创建及相关函数
#####列表#[]或list()创建链表empty_list = []weekdays = ['Monday','Tuesday','Wednesday','Thursday','Firday']another_empty_list = list()print(another_empty_list)print(list('cat'))#使用offset获取元素#和c数值型类似,但Python可以...转载 2018-02-08 00:30:32 · 364 阅读 · 0 评论 -
线性回归
#线性回归实现import numpy as npimport matplotlib.pyplot as pltclass Line: def __init__(self,x,y): #参数定义 self.x = x self.y = y self.k = 0.8 self.b = 0.0 ...原创 2019-08-15 21:52:48 · 136 阅读 · 0 评论