对 scikit-learn 中一些感知器参数的解释

explanation on some perceptron parameters from scikit-learn

我需要使用感知器算法来研究一些线性不可分的数据集的学习率和渐近误差
为此,我需要了解构造函数的一些参数。我花了很多时间在谷歌上搜索它们,但我仍然不太了解它们的作用或如何使用它们。
给我带来更多问题的是:alpha 和 eta0

我了解到算法的每次更新是:


其中(d-y(t))只是给出想要的+或-,以增加或减少向量的分量,r是平滑更新的学习率。

来自 scikit-learn 文档 (https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.Perceptron.html)
'alpha' 是一个常量,如果使用正则化,它会乘以正则化项。
'eta0' 是更新乘以的常数。

感知器中的正则化项 (alpha) 是什么?在公式的哪一部分出现?
eta0是上面公式的'r'吗?
这两个参数都会减慢算法速度但会提高算法效率,我想了解如何最好地使用它们。

提前谢谢你,即使不完整,我也会很感激。

首先让我来解决这个问题:

where (d-y(t)) just gives the desired + or -, in order to increase or decrease the component of the vector

更准确地说,(d-y(t))是实际输出与期望输出之间的距离。我们的修正应该与误差大小成正比(这是通过数学证明得出的)是有道理的。

What is the regularization term (alpha) in the perceptron? in which part of the formula appears?

来自 Perceptron 上的 scikit 学习文档:

Perceptron is a classification algorithm which shares the same underlying implementation with SGDClassifier. In fact, Perceptron() is equivalent to SGDClassifier(loss="perceptron", eta0=1, learning_rate="constant", penalty=None).

以及 SGDClassifier

The regularizer is a penalty added to the loss function that shrinks model parameters towards the zero vector using either the squared euclidean norm L2 or the absolute norm L1 or a combination of both (Elastic Net). If the parameter update crosses the 0.0 value because of the regularizer, the update is truncated to 0.0 to allow for learning sparse models and achieve online feature selection.

好了。正则化项使模型参数尽可能小。这也在神经网络中完成:here 是一个很好的解释。

Is the eta0 the 'r' of the formula above?

是的,学习率通常用eta表示。