2016.03.30 Supervised learning

1.As with full Bayesian inference, MAP Bayesian inference has the advantage of leveraging information that is brought by the prior and cannot be found in the training data. This additional information helps to reduce the variance in the MAP point estimate (in comparison to the ML estimate). However, it does so at the price of increased bias.


MAP估计器相比于MLE估计器能降低估计器的方差,使得估计器分布更集中,但由于MAP估计引入了偏好,使得估计的偏增加。



2.The power of kernel trick


The kernel trick is powerful for two reasons. First, it allows us to learn models that are nonlinear as a function of x using convex optimization techniques that are guaranteed to converge efficiently. This is possible because we consider φ fixed and optimize only α, i.e., the optimization algorithm can view the decision function as being linear in a different space. Second, the kernel function k often admits an implementation that is significantly more computational efficient than naively constructing two φ(x) vectors and explicitly taking their dot product.


SVM并不是唯一使用kernel trick的算法,有许多算法通过kernel trick从线性算法推广到非线性算法。所有采用kernel trick的算法统称kernel methods。

3.Kernel methods的主要缺点

A major drawback to kernel machines is that the cost of evaluating the decision function is linear in the number of training examples, because the i-th example contributes a term αik(x, x(i)) to the decision function. Support vector machines are able to mitigate this by learning an α vector that contains mostly zeros.Classifying a new example then requires evaluating the kernel function only for the training examples that have non-zero αi. These training examples are known as support vectors.


Kernel machines also suffer from a high computational cost of training when the dataset is large. We will revisit this idea in Sec. 5.9. Kernel machines with generic kernels struggle to generalize well. We will explain why in Sec. 5.11. The modern incarnation of deep learning was designed to overcome these limitations of kernel machines. The current deep learning renaissance began when Hinton et al.(2006) demonstrated that a neural network could outperform the RBF kernel SVM on the MNIST benchmark.


4.关于K近邻算法


As a non-parametric learning algorithm,k-nearest neighbor can achieve very high capacity. For example,suppose we have a multiclass classification task and measure performance with 0-1 loss. In this setting, 1-nearest neighbor converges to double the Bayes error as the number of training examples approaches infinity. The error in excess of the Bayes error results from choosing a single neighbor by breaking ties between equally distant neighbors randomly. When there is infinite training data, all test points x will have infinitely many training set neighbors at distance zero. If we allow the algorithm to use all of these neighbors to vote, rather than randomly choosing one of them, the procedure converges to the Bayes error rate. The high capacity of k-nearest neighbors allows it to obtain high accuracy given a large training set.




在使用PyCharm安装`machine_learning.supervised_basic`库失败时,有几个可能的原因和相应的解决方案。`machine_learning.supervised_basic`并不是一个标准的Python库,因此在安装时可能会遇到一些困难。这可能是一个特定项目中定义的模块,或者是一个不存在的模块。以下是解决这个问题的一些建议: 1. 确认库是否存在:首先,确保`machine_learning.supervised_basic`库确实存在。如果是一个第三方库,可能需要在PyPI(Python Package Index)或者相应的代码仓库中查找。如果是项目特定的库,需要确认其安装方法或源代码位置。 2. 使用正确的安装命令:如果`machine_learning.supervised_basic`是一个可通过pip安装的库,可以在PyCharm的终端中使用以下命令进行安装: ``` pip install machine_learning.supervised_basic ``` 如果使用的是conda环境,可以尝试: ``` conda install machine_learning.supervised_basic ``` 如果安装命令中带有版本号,确保使用正确的版本号。 3. 检查PyCharm设置:确保PyCharm的项目解释器设置正确,该解释器具有安装新库的权限。有时可能需要激活虚拟环境。 4. 检查错误信息:安装失败时,通常会伴随着错误信息。仔细阅读错误信息可以提供为什么安装失败的线索,例如是否有拼写错误、网络问题或缺少依赖等。 5. 检查PyCharm控制台:在PyCharm的底部面板中,有一个控制台输出窗口。在这里可以看到安装过程中的详细信息和错误消息,这对于诊断问题非常有用。 6. 检查网络连接:确保在安装时网络连接是稳定的,因为安装过程中需要从网络上下载数据。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值