![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Machine Learning(Hung-yi Lee)
文章平均质量分 94
李宏毅2020机器学习课程笔记
Navajo_c
我给你的光是明是暗
展开
-
从零开始自己搭建RNN【Pytorch文档】1
从零开始自己搭建RNN【Pytorch文档】1先贴官方教程:https://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.html 参考Blog:https://blog.csdn.net/iteapoy/article/details/106478462字母级RNN的分类任务数据下载:https://download.pytorch.org/tutorial/data.zip...原创 2021-06-01 16:01:48 · 1504 阅读 · 1 评论 -
Machine Learning —— Unsupervised Learing:Word Embeding
Machine Learning —— Unsupervised Learing:Word EmbedingNLP中词嵌入(Word Embedding)相关的基本知识Introductionword embeding(词嵌入)是Dimension Reducation(降维)算法的典型应用用vector表示word的方法1-of-N Encoding最传统的做法是1-of-N Encoding,假设这个vector的维数就等于世界上所有单词的数目,那么对每一个单词来说,只需要某一维为1,其原创 2021-05-25 21:32:28 · 148 阅读 · 1 评论 -
Machine Learning —— Semi-supervised Learning
Machine Learning —— Semi-supervised LearningIntroductionSupervised Learning:(xr,y^r)r=1R(x^r,\hat{y}^r)^R_{r=1}(xr,y^r)r=1Rtraining data中,每一组data都有input 和对应的outputSemi-supervised Learning:(xr,y^r)r=1R+(xu)u=RR+U{(x^r,\hat{y}^r)^R_{r=1}+({x^u})^{R+U原创 2021-05-25 19:57:15 · 295 阅读 · 1 评论 -
Machine Learning —— Recurrent Neural Network
Machine Learning —— Recurrent Neural NetworkRNN,或者说最常用的LSTM,一般用于记住之前的状态,以供后续神经网络的判断,它由input gate、forget gate、output gate和cell memory组成,每个LSTM本质上就是一个neuron,特殊之处在于有4个输入:zzz和三门控制信号ziz_izi、zfz_fzf、zoz_ozo,每个时间点的输入都是由当前输入值+上一个时间点的输出值+上一个时间点cell值来组成Introd原创 2021-05-24 21:04:35 · 229 阅读 · 0 评论 -
Machine Learining(李宏毅2020) —— hw03
Machine Learining —— hw03:CNN作业说明通过Convolutional Neural Networks对食物进行分类数据集中的食物图采集于网上,总共11类::Bread,Dairy product,Dessert,Egg,Fried food,Meat,Noodles/Pasta,Rice,Seafood,Soup,Vegetable/Fruit用一个数字表示一个类数据说明数据规模:Training set:9866张Validation set:3430张原创 2021-05-24 18:55:39 · 550 阅读 · 0 评论 -
Machine Learning —— pytorch入门
Machine Learning —— pytorch入门torch简单操作1、张量生成from __future__ import print_functionimport torchx1 = torch.empty(5, 3)#生成一个未初始化的5*3的张量,数值随机print(x1)x2 = torch.rand(5, 3)#生成一个均匀分布的张量,元素从0-1print(x2)#其他随机张量生成函数:torch.randn()标准正态分布、torch.normal()离散正原创 2021-05-22 20:03:00 · 313 阅读 · 0 评论 -
Machine Learning —— Convolutional Neural Network
Machine Learning —— Convolutional Neural NetworkWhy CNN for Image?CNN V.s. DNN我们当然可以用一般的neural network来做影像处理,不一定要用CNN,比如说,你想要做图像的分类,那你就去train一个neural network,它的input是一张图片,你就用里面的pixel来表示这张图片,也就是一个很长很长的vector,而output则是由图像类别组成的vector,假设你有1000个类别,那output就有1原创 2021-05-18 17:39:41 · 226 阅读 · 0 评论 -
Machine Learning —— Tips of DNN
Machine Learning —— Tips of DNN本文会顺带解决CNN部分的两个问题max pooling架构中用到的max无法微分,那在gradient descent的时候该如何处理L1 的Regression到底是什么针对training set和testing set上的performance分别提出针对性的解决方法在training set上准确率不高:– new activation function:ReLU、Maxout– adaptive learning原创 2021-05-13 23:17:03 · 218 阅读 · 0 评论 -
Machine Learning —— Backpropagation
Machine Learning —— BackpropagationGradient Descentgradient descent的使用方法,跟前面讲到的linear Regression或者是Logistic Regression是一模一样的,唯一的区别就在于当它用在neural network的时候,neural network的parameter θ∗=w1,w2,...,b1,b2,..\theta^*=w_1,w_2,...,b_1,b_2,..θ∗=w1,w2,...,b1,b2原创 2021-05-13 17:21:35 · 151 阅读 · 0 评论 -
Machine Learning —— Why Deep?
Machine Learning —— Why Deep?Deep is better?有人就认为,deep learning的表现这么好,完全就是用大量的data去硬train一个非常复杂的model而得到的结果,既然大量的data加上参数足够多的model就可以实现这个效果,那为什么一定要用DNN呢?我们完全可以用一层的shallow neural network来做同样的事情,理论上只要这一层里neuron的数目足够多,有足够的参数,就可以表示出任何函数;那DNN中deep的意义何在呢?Fat原创 2021-05-11 18:59:48 · 107 阅读 · 1 评论 -
Machine Learning —— Deep Learning
Machine Learning —— Deep LearningUps and downs of Deep LearningThree Steps for Deep LearningNeural Networkconcept把多个Logistic Regression前后connect在一起,把一个Logistic Regression称为neuron,整个称为neural networkneural network里的每一个Logistic Regression都有自己的weight和b原创 2021-05-11 17:05:52 · 195 阅读 · 1 评论 -
Machine Learning —— Logistic Regression
Machine Learning —— Logistic RegressionReview在classification章节中,讨论了利用样本点的均值和协方差来计算P(C1),P(x∣C1),P(C2),P(x∣C2)P(C_1),P(x|C_1),P(C_2),P(x|C_2)P(C1),P(x∣C1),P(C2),P(x∣C2),进而计算得到新的样本点x属于class1的概率之后还推导了P(C1∣X)=σ(z)=11+e−zP(C_1|X)=\sigma(z)=\frac{1}{1+e^{原创 2021-05-03 18:52:41 · 225 阅读 · 0 评论 -
Machine Learining(李宏毅2020) —— hw02
Machine Learining —— hw02:Logistic1、hw02作业理解作业中共给了6份资料:输出结果格式、测试集(不带标签)、训练集、X_train、Y_train、X_test。观察可知后三个文件是已事先把数据整理成csv格式的数据,于是训练数据共54256个,测试大约20000个、参数510个二分类问题(Binary Classification)模型输入510维,输出一个布尔值表示“是”或“否”——使用Logistic Regression model2、数据预处原创 2021-05-09 17:54:59 · 717 阅读 · 0 评论 -
Machine Learning —— Classification
Machine Learning —— Classification: Probabilistic Generative ModelClassification基本概念分类问题是找一个function,它的input是一个object,它的输出时这个object属于哪一个class。以宝可梦为例,已知宝可梦有18种属性,现在要解决的分类问题就是做一个宝可梦种类的分类器,我们要找到一个function,这个function的input是某只宝可梦,它的output是这只宝可梦属于哪一个类别。输入数值原创 2021-04-30 14:52:40 · 365 阅读 · 0 评论 -
Machine Learning —— Gradient Descent
Machine Learning —— Gradient Descent1、Review前面预测的pokemon的CP值例子中已经初步介绍了Gradient Descent的用法:In step3, we have to solve the following optimization problem:θ∗=argminfL(θ)\theta^*=\operatorname{arg}\mathop{min}\limits_fL(\theta)θ∗=argfminL(θ)L:loss  原创 2021-04-26 21:00:30 · 171 阅读 · 0 评论 -
Machine Learning —— Basic Concept: Where does the error come from
Machine Learning —— Where does the error come from1、Error来源BiasVariance2、Model简单和复杂时的情况当model比较简单时,variance比较小,bias比较大,此时的f∗f^*f∗会比较集中,但是function set可能并没有包含真实的标准函数f^\hat{f}f^,此时model受bias影响较大当model比较复杂时,variance比较大,bias比较小,此时的f∗f^*f∗会比较分散,但是func原创 2021-04-25 23:59:34 · 88 阅读 · 0 评论 -
Machine Learining(李宏毅2020) —— hw01
Machine Learining —— hw011、hw01作业理解作业数据给:数据集和测试集大概内容是数据集中记录了12个月的前20天的24小时的18个数据,测试集是从剩余的数据中再取的CSV文件,包括台湾丰原地区240天(12x20)的气象观测资料(取每个月前20天的数据做训练集,每个月后10天数据用作测试,学生不可见)每天的监测时间点为0时、1时、2时、…、23时,共24个小时每天检测的指标包括CO、NO、PM2.5、PM10等气体信息,以及是否降雨、刮风等气象信息,共计18项模原创 2021-04-25 00:02:21 · 622 阅读 · 0 评论 -
Machine Learining —— Regression:Case Study
问题导入:预测宝可梦的CP值Estimating teh Combat Power(CP) of a pokemon after evolution根据已有的宝可梦进化前后的信息,来预测某只宝可梦进化后的CP值大小一、确定Senario、Task and Model1、Senario首先根据已有的data来确定Senario,已有一批宝可梦进化前后CP值的数据,input是进化前宝可梦的各种属性,output是进化后宝可梦的CP值;因此我们的data是labeled,使用的Senario是supe原创 2021-04-18 16:47:53 · 162 阅读 · 0 评论