gpt4 book ai didi

python - 使用 Python 实现计算机视觉深度学习中的感知器算法

转载 作者:行者123 更新时间:2023-11-30 09:39:16 25 4
gpt4 key购买 nike

我正在处理这本书Deep Learning for Computer Vision with Python作者:阿德里安·罗斯布洛克。我想知道为什么 scikit-learn 中的结果与书中实现的结果有很大不同。请查码here.

最佳答案

来自 scikit-learn documentation :

The Perceptron is another simple classification algorithm suitable for large scale learning. By default:

  • It does not require a learning rate.

  • It is not regularized (penalized).

  • It updates its model only on mistakes.

The last characteristic implies that the Perceptron is slightly faster to train than SGD with the hinge loss and that the resulting models are sparser.

来自 here

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 进行比较。

关于python - 使用 Python 实现计算机视觉深度学习中的感知器算法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59980596/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com