对数据的认识
机器学习就是对一个未知分布的数据建模的过程。无论是机器学习哪种学派,其都认为观察到的数据并不是凭空产生的,而是由一个潜在的、客观存在的数据生成过程所产生。这个数据生成过程可以用一个概率分布来描述。
例如抛硬币,会出现正面或反面,我们抛了次,得到个数据。这个结果就可以看作是由一个伯努利分布生成(采样)的。
机器学习就是对一个未知分布的数据建模的过程。无论是机器学习哪种学派,其都认为观察到的数据并不是凭空产生的,而是由一个潜在的、客观存在的数据生成过程所产生。这个数据生成过程可以用一个概率分布来描述。
例如抛硬币,会出现正面或反面,我们抛了k次,得到k个数据。这个结果就可以看作是由一个伯努利分布生成(采样)的。
举一个例子(源于【隐变量(潜在变量)模型】硬核介绍):
观察下图,表面上我们观测到的数据是一堆点 x={x1,x2,…,xn},但实际上我们可以直观地发现这些点以某种概率采样自四个不同的分布(假设都是高斯分布)。而潜在变量 zi 控制了 xi 从哪个分布中采样:zi∼N(μk,σk2),其中 k=1,2,3,4。设 σk 已知。于是,潜在变量 zi 表示观测变量 xi 对应类别的序号。
[1] A Gentle Introduction to Graph Neural Networks
[2] Graph neural networks: A review of methods and applications
This article will introduce a powerful technique in machine learning called Ateention Mechanism.
The core method of attention mechanism is to pay more attention to what we want. It allows model to weigh the importance of different parts of input dynamically rather than treating them equally. The model learns to assign higher weights to the most relevant elements.
本节整理卷积方面基本概念
Convolution: Convolution is to use a movable window (convolution kernel) to perform a dot multiplication and addition operation with the corresponding elements of the image at a certain step size. Convolution is essentially a transformation of the data dimension to extract the features of the image. Compared with the fully connected layer that directly expands the image into a row vector, it can better capture the spatial features of the image. Of course, by changing the shape of the parameters, any fully connected layer can be converted into an equivalent convolution layer.
Scheduler is used to adjust learning rate.
torch.optim.lr_scheduler.LRScheduler provides several methods to adjust the learning rate based on the number of epochs. torch.optim.lr_scheduler.ReduceLROnPlateau allows dynamic learning rate reducing based on some validation measurements.
本节整理机器学习的基本问题
magnitude: 幅度 order of magnitude:数量级 converge: 收敛 oscillate: 振荡 fit: 拟合 fine-tune: 调参 generalization ability:泛化能力 dimension: 量纲 deviation:偏离
什么是机器学习和深度学习? 机器学习是一种实现人工智能的方法。人工智能是想要达成的目标,而机器学习是想要达成目标的手段:希望机器通过学习的手段,可以跟人一样聪明。机器学习是研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构,使不断改善自身的性能。而深度学习,就是机器学习的其中一种方法。
机器学习流程? **表示 represent:**将数据对象进行特征(feature)化表示
**训练 train:**给定一个数据样本集,从中学习出规律(模型),目标:该规律不仅适用于训练数据,也适用于未知数据(称为泛化能力)
**测试 test:**对于一个新的数据样本,利用学到的模型进行预测
在机器学习中,学习率这种参数叫什么?学习率太大和太小的可能影响?
学习率(learning rate)也叫步长,指更新参数步幅。表征了参数每次更新的幅度(represent the magnitude of parameter update)