机器学习
文章平均质量分 50
林下的码路
华中科技大学研究生,热爱算法,喜欢编程。
展开
-
使用scikit-learn实现决策树的算法模板
给出AllElectronics.csv文件,其原始训练数据如下: RID age income student credit_rating class_buy_computer 1 youth high no fair no 2 youth high no excellent no 3原创 2017-09-01 18:15:22 · 1119 阅读 · 0 评论 -
Variable变量(莫烦PyTorch 动态神经网络笔记)
import torch from torch.autograd import Variable tensor = torch.FloatTensor([[1,2],[3,4]]) variable = Variable(tensor,requires_grad=True) print(tensor) print(variable) print(tensor*tensor) t_out = t...原创 2018-05-30 17:10:20 · 995 阅读 · 0 评论 -
Numpy & Torch对比(莫烦PyTorch 动态神经网络笔记)
import torch import numpy as np np_data = np.arange(6).reshape(2,3) torch_data = torch.from_numpy(np_data) tensor2array = torch_data.numpy() print( '\nnumpy',np_data, '\ntorch',torch_data, ...原创 2018-05-30 16:28:04 · 847 阅读 · 0 评论 -
Numpy & Pandas (莫烦 Python 数据处理教程)笔记
Numpy教程笔记:import numpy as np #numpy属性 print('#numpy属性') array = np.array([[1,2,3], [2,3,4]]) print(array) print('number of dim',array.ndim)#number of dim 2 print('shape:',array.shape...原创 2018-03-15 16:45:32 · 1544 阅读 · 2 评论 -
在windows打开ipynb文件
首先下载安装Anaconda,然打开cmd,切换到Anaconda2\Scripts\文件目录下,输入ipython.exe notebook命令,即可在浏览器端启动界面。点击界面上Upload按钮,上传要打开的ipynb文件。上传成功后即可自动显示python代码。原创 2018-01-09 13:42:30 · 2276 阅读 · 0 评论 -
Python基础中的一些重点
1、list的拷贝: 浅拷贝: x = ["a","b","c"] y = x y[1]="z" print(x) print(y) 输出结果(x,y指向同一块内存): ['a', 'z', 'c'] ['a', 'z', 'c'] 深拷贝: x = ["a","b","c"] y = list(x) y[1]="z" print(x) print(y)输出结果(x,y分别指向不原创 2017-10-25 09:39:46 · 727 阅读 · 0 评论 -
卷积层大小计算公式
Given: our input layer has a width ofWand a height ofH our convolutional layer has a filter sizeF we have a stride ofS a padding ofP and the number of filtersK, the following formula gives...转载 2019-06-11 16:49:46 · 759 阅读 · 0 评论