#-*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
'''
print(3 in [1,2,3,4])
a = [2,3,1,2]
print(a.sort())
s = [3, 4, 5, 6, 7, 9, 11, 13, 15, 17]
print(s[3:7])
dict = {'a' : 1, 'b' : 2}
print(dict)
print(dict.keys())
print(dict.values())
a = ['name','age','sex']
b = ['Dong',38,'Male']
c = dict(zip(a,b))
print(c)
a = [1, 2, 3, 4, 5, 6, 7]
b = a[::3]
print(b)
print([5 for i in range(10)])
'''
'''
from collections import Counter
import random
list1 = [random.randint(0,100) for i in range(1000)]
result = Counter(list1)
print(result)
'''
'''
import random
x = [random.randint(0,100) for i in range(20)]
a = sorted(x[:10])
b = sorted(x[10:20], reverse=True)
x = a + b
print(x)
'''
'''
x = input("input a list:")
i, j = input("input two cor:")
print(x[i:j + 1])
'''
'''
x = {4:'d',5:'r',7:'0'}
m = input("input a key:")
print(x.get(m, '您输入的键不存在!'))
'''
'''
import numpy as np
data = [1, 2, 3, 3]
line = [2, 3, 4, 4]
def Distance(dataOneLine, center):
return np.sqrt(np.sum((np.array(dataOneLine) - np.array(center)) ** 2))
print(Distance(data, line))
print(min(data))
datal = [i for i in range(len(data)) if data[i] == 3]
print(datal)
p = np.array([1, 2, 3, 5, 6])
x = [[1, 2], [6, 3]]
print(np.mean(x, axis=0))
#0 : up - down
#1 : left - right
print([2, 3] in x)
for i in enumerate(p):
print i
x = np.arange(-2, 3)
print (np.flatnonzero(np.array([False ,True, False, False, False])))
print(p/2.0)
t = np.random.choice(p, 5, replace= False)
print(t)
x = np.array([[1, 2], [3, 5],[6, 9]])
print(x[[1, 2]])
'''
'''
import numpy as np
x = np.random.randint(1, 1000, 50)
x = x[x % 2 == 0]
print(x)
'''
'''
import random
x = [random.randint(0,100) for i in range(50)]
i = 0
while i < len(x):
if x[i] % 2 == 1:
del x[i]
else:
i = i + 1
print(x)
'''
'''
import random
list = [random.randint(0,100) for i in range(20)]
print(list)
for i in range(0,19,2):
for j in range(i,19,2):
if list[i] < list[j]:
list[i],list[j] = list[j],list[i]
print(list)
'''
'''
x = input('Please input an integer :')
t = x
i = 2
result = []
while True:
if t==1:
break
if t%i==0:
result.append(i)
t = t/i
else:
i+=1
print x,'=','*'.join(map(str,result))
'''
'''
r_1 = 0
for i in range(1,100,2):
r_1 += i
print r_1
r_2 = 0
for i in range(101):
r_2 += i
print (r_2 - 50) / 2
'''
'''
import math
def _finde(x,y):
n = x.find(y)
if n==-1:
return False
else :
n = x[n+1::].find(y)
if n==-1:
return True
return False
def isPrime(x):
for i in range(2,int(math.sqrt(x)+1)):
if x%i == 0:
return False
return True
for i in range(10000):
if isPrime(i):
i=str(i)
if _finde(i,"1") & _finde(i,"2") & _finde(i,"3") & _finde(i,"4"):
print(i)
continue
def demo(v):
capital = little = digit = other =0
for i in v:
if 'A'<=i<='Z':
capital+=1
elif 'a'<=i<='z':
little+=1
elif '0'<=i<='9':
digit+=1
else:
other+=1
return (capital,little,digit,other)
x = 'capital = little = digit = other =0'
print(demo(x))
#coding=utf-8
l = list()
while True:
try:
num = int(raw_input())
l.append(num)
except:
break
print max(l), sum(l)
def Sum(v):
s = 0
for i in v:
s += i
return s
x = [1,2,3,4,5]
print(Sum(x))
x = (1,2,3,4,5)
print(Sum(x))
def sorted(itera):
new_itera = []
while itera:
min_value = min(itera)
new_itera.append(min_value)
itera.remove(min_value)
return new_itera
'''
'''
# Python Program to create
# a data type object
import numpy as np
# Integer datatype
# guessed by Numpy
x = np.array([1, 2])
print("Integer Datatype: ")
print(x.dtype)
# Float datatype
# guessed by Numpy
x = np.array([1.0, 2.0])
print("\nFloat Datatype: ")
print(x.dtype)
# Forced Datatype
x = np.array([1.2, 2.0], dtype = np.int64)
print("\nForcing a Datatype: ")
print(x.dtype)
print(x)
'''
'''
# Python Program to create
# a data type object
import numpy as np
# First Array
arr1 = np.array([[4, 7], [2, 6]],
dtype = np.float64)
# Second Array
arr2 = np.array([[3, 6], [2, 8]],
dtype = np.float64)
# Addition of two Arrays
Sum = np.add(arr1, arr2)
print("Addition of Two Arrays: ")
print(Sum)
# Addition of all Array elements
# using predefined sum method
Sum1 = np.sum(arr1)
print("\nAddition of Array elements: ")
print(Sum1)
# Square root of Array
Sqrt = np.sqrt(arr1)
print("\nSquare root of Array1 elements: ")
print(Sqrt)
# Transpose of Array
# using In-built function 'T'
Trans_arr = arr1.T
print("\nTranspose of Array: ")
print(Trans_arr)
'''
''
s = ['eqwe','342', '4', '4']
d = set(s)
print(d)
print(set('Python'))
没有合适的资源?快使用搜索试试~ 我知道了~
一些机器学习算法纯手工实现.zip
共58个文件
png:25个
py:21个
pyc:12个
需积分: 5 1 下载量 44 浏览量
2024-04-12
14:49:12
上传
评论
收藏 8.43MB ZIP 举报
温馨提示
机器学习是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。它专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径。 随着统计学的发展,统计学习在机器学习中占据了重要地位,支持向量机(SVM)、决策树和随机森林等算法的提出和发展,使得机器学习能够更好地处理分类、回归和聚类等任务。进入21世纪,深度学习成为机器学习领域的重要突破,采用多层神经网络模型,通过大量数据和强大的计算能力来训练模型,在计算机视觉、自然语言处理和语音识别等领域取得了显著的成果。 机器学习算法在各个领域都有广泛的应用,包括医疗保健、金融、零售和电子商务、智能交通、生产制造等。例如,在医疗领域,机器学习技术可以帮助医生识别医疗影像,辅助诊断疾病,预测病情发展趋势,并为患者提供个性化的治疗方案。在金融领域,机器学习模型可以分析金融数据,识别潜在风险,预测股票市场的走势等。 未来,随着传感器技术和计算能力的提升,机器学习将在自动驾驶、智能家居等领域发挥更大的作用。同时,随着物联网技术的普及,机器学习将助力智能家居设备实现更加智能化和个性化的功能。在工业制造领域,机器学习也将实现广泛应用,如智能制造、工艺优化和质量控制等。 总之,机器学习是一门具有广阔应用前景和深远影响的学科,它将持续推动人工智能技术的发展,为人类社会的进步做出重要贡献。
资源推荐
资源详情
资源评论
收起资源包目录
一些机器学习算法纯手工实现.zip (58个子文件)
content
k-mean
k_mean.py 2KB
regression
UnaryLinearRegression.py 947B
MultipleLinearRegression.py 992B
KNN
KNN.py 1KB
svm
svm.py 4KB
CNN
backPropagationThought
deepLearningBP.png 2.56MB
deepLearningBP总结.png 461KB
train
train.py 2KB
__pycache__
train.cpython-38.pyc 2KB
Reference
DataPreDeal.png 234KB
bias.png 156KB
convolution
convolution.py 954B
__pycache__
convolution.cpython-38.pyc 762B
Reference
convolutionMotivation.png 209KB
2020-07-31_121009.png 31KB
buildNetwork
buildConv.py 5KB
__pycache__
buildConv.cpython-38.pyc 3KB
Reference
softmax求导.png 245KB
buildConv.png 73KB
w,b的梯度.png 77KB
extractData
extract.py 680B
__pycache__
extract.cpython-38.pyc 847B
gradientDescentThought
deepLearningGD总结.png 318KB
DeepLearningGD.png 2.17MB
initData
initData.py 233B
__pycache__
initData.cpython-38.pyc 553B
pooling
maxpool.py 931B
__pycache__
maxpool.cpython-38.pyc 653B
Reference
2020-07-31_121103.png 14KB
bootStrap.py 1KB
predict
predict.py 674B
function
loss.py 165B
softmax.py 328B
nanargmax.py 128B
__pycache__
softmax.cpython-38.pyc 313B
loss.cpython-38.pyc 310B
nanargmax.cpython-38.pyc 340B
Reference
softmax1.png 56KB
softmax2.png 30KB
optimize
adamGD.py 3KB
__pycache__
adamGD.cpython-38.pyc 2KB
Reference
动量法1.png 51KB
Adam.png 95KB
RMSProp.png 140KB
AdaGrad.png 199KB
SGD.png 104KB
动量法2.png 169KB
BGD.png 180KB
AdamInCode.png 803KB
convNetworkBackPropagation
convBP
convolutionBackward.py 1KB
__pycache__
convolutionBackward.cpython-38.pyc 820B
Reference
卷积层的BP代码所用方法.png 284KB
卷积层的BP.png 131KB
poolBP
maxpoolBackward.py 695B
__pycache__
maxpoolBackward.cpython-38.pyc 698B
Reference
池化层反向传播.png 81KB
test.py 5KB
decisionTree
decisionTree.py 4KB
共 58 条
- 1
资源评论
生瓜蛋子
- 粉丝: 3795
- 资源: 4235
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功