[关闭]
@vivounicorn 2018-10-06T15:12:13.000000Z 字数 6370 阅读 2220

机器学习与人工智能技术分享-第三章 机器学习中的统一框架

机器学习 Bagging Boosting 正则化

回到目录


3. 机器学习中的统一框架

很多机器学习问题都可以放在一个统一框架下讨论,这样大家在理解各种模型时就是相互联系的。

3.1 目标函数

回忆一下目标函数的定义:

很多模型可以用这种形式框起来,比如linear regression、logistic regression、SVM、additive models、k-means,neural networks 等等。其中损失函数部分用来控制模型的拟合能力,期望降低偏差,正则项部分用来提升模型泛化能力,期望降低方差,最优模型是对偏差和方差的最优折中。

3.1.1 损失函数

损失函数反应了模型对历史数据的学习程度,我们期望模型能尽可能学到历史经验,得到一个低偏差模型。

Q:大家想想横坐标是什么?

实践当中很少直接使用0-1损失做优化(当然也有这么用的如:Direct 0-1 Loss Minimization and Margin Maximization with BoostingAlgorithms for Direct 0–1 Loss Optimization in Binary Classification,但总的来说应用有限),原因如下:

  • 0-1损失的优化是组合优化问题且为NP-hard,无法在多项式时间内求得;
  • 损失函数非凸非光滑,很多优化方法无法使用;
  • 对权重的更新可能会导致损失函数大的变化,即变化不光滑;
  • 只能使用正则,其他正则形式都不起作用;
  • 即使使用正则,依然是非凸非光滑,优化求解困难。

由于0-1损失的问题,所以以上损失函数都是对它的近似。原理细节可以参考:Understanding Machine Learning: From Theory to Algorithms

不同损失函数在相同数据集下的直观表现如下:

3.1.2 正则化项

正则化项影响的是模型在未知样本上的表现,我们希望通过它能降低模型方差提高泛化性。

如果有数据集:


在给定假设下,通常采用极大似然估计(MLE)求解参数:

假设模型参数也服从某种概率分布: , 可以采用极大后验概率估计(MAP)求解参数。

3.1.3 L2 正则

假设

3.1.4 L1 正则

假设

3.1.5 正则化的几何解释


L1 and L2 Regularization

给定向量, 定义 正则,其中

不同q的取值下正则项的几何表现如下:


from wiki

3.1.6 Dropout正则化与数据扩充

这两类方法在神经网络中比较常用,后面会专门介绍。

3.2 神经网络框架

很多模型可以看做是神经网络,例如:感知机、线性回归、支持向量机、逻辑回归等

3.2.1 Linear Regression

线性回归可以看做是激活函数为的单层神经网络:

3.2.2 Logistic Regression

逻辑回归可以看做是激活函数为的单层神经网络:

3.2.3 Support Vector Machine

采用核方法后的支持向量机可以看做是含有一个隐层的3层神经网络:

3.2.4 Bootstrap Neural Networks

采用bagging方式的组合神经网络:

3.2.5 Boosting Neural Network

采用boosting方式的组合神经网络:

References

如有遗漏请提醒我补充:
1、《Understanding the Bias-Variance Tradeoff》
http://scott.fortmann-roe.com/docs/BiasVariance.html
2、《Boosting Algorithms as Gradient Descent in Function Space》
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.51.6893&rep=rep1&type=pdf
3、《Optimal Action Extraction for Random Forests and
Boosted Trees》
http://www.cse.wustl.edu/~ychen/public/OAE.pdf
4、《Applying Neural Network Ensemble Concepts for Modelling Project Success》
http://www.iaarc.org/publications/fulltext/Applying_Neural_Network_Ensemble_Concepts_for_Modelling_Project_Success.pdf
5、《Introduction to Boosted Trees》
https://homes.cs.washington.edu/~tqchen/data/pdf/BoostedTree.pdf
6、《Machine Learning:Perceptrons》
http://ml.informatik.uni-freiburg.de/_media/documents/teaching/ss09/ml/perceptrons.pdf
7、《An overview of gradient descent optimization algorithms》
http://sebastianruder.com/optimizing-gradient-descent/
8、《Ad Click Prediction: a View from the Trenches》
https://www.eecs.tufts.edu/~dsculley/papers/ad-click-prediction.pdf
9、《ADADELTA: AN ADAPTIVE LEARNING RATE METHOD》
http://www.matthewzeiler.com/pubs/googleTR2012/googleTR2012.pdf
9、《Improving the Convergence of Back-Propagation Learning with Second Order Methods》
http://yann.lecun.com/exdb/publis/pdf/becker-lecun-89.pdf
10、《ADAM: A METHOD FOR STOCHASTIC OPTIMIZATION》
https://arxiv.org/pdf/1412.6980v8.pdf
11、《Adaptive Subgradient Methods for Online Learning and Stochastic Optimization》
http://www.jmlr.org/papers/volume12/duchi11a/duchi11a.pdf
11、《Sparse Allreduce: Efficient Scalable Communication for Power-Law Data》
https://arxiv.org/pdf/1312.3020.pdf
12、《Asynchronous Parallel Stochastic Gradient Descent》
https://arxiv.org/pdf/1505.04956v5.pdf
13、《Large Scale Distributed Deep Networks》
https://papers.nips.cc/paper/4687-large-scale-distributed-deep-networks.pdf
14、《Introduction to Optimization —— Second Order Optimization Methods》
https://ipvs.informatik.uni-stuttgart.de/mlr/marc/teaching/13-Optimization/04-secondOrderOpt.pdf
15、《On the complexity of steepest descent, Newton’s and regularized Newton’s methods for nonconvex unconstrained optimization》
http://www.maths.ed.ac.uk/ERGO/pubs/ERGO-09-013.pdf
16、《On Discriminative vs. Generative classifiers: A comparison of logistic regression and naive Bayes 》
http://papers.nips.cc/paper/2020-on-discriminative-vs-generative-classifiers-a-comparison-of-logistic-regression-and-naive-bayes.pdf
17、《Parametric vs Nonparametric Models》
http://mlss.tuebingen.mpg.de/2015/slides/ghahramani/gp-neural-nets15.pdf
18、《XGBoost: A Scalable Tree Boosting System》
https://arxiv.org/abs/1603.02754
19、一个可视化CNN的网站
http://shixialiu.com/publications/cnnvis/demo/
20、《Computer vision: LeNet-5, AlexNet, VGG-19, GoogLeNet》
http://euler.stat.yale.edu/~tba3/stat665/lectures/lec18/notebook18.html
21、François Chollet在Quora上的专题问答:
https://www.quora.com/session/Fran%C3%A7ois-Chollet/1
22、《将Keras作为tensorflow的精简接口》
https://keras-cn.readthedocs.io/en/latest/blog/keras_and_tensorflow/
23、《Upsampling and Image Segmentation with Tensorflow and TF-Slim》
https://warmspringwinds.github.io/tensorflow/tf-slim/2016/11/22/upsampling-and-image-segmentation-with-tensorflow-and-tf-slim/

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注