我正在研究机器学习中的“逻辑回归”主题。我可以理解整个概念,即它试图最大化属于特定类标签的实例的可能性
如果运行多次迭代,该算法会找到一个分隔实例的权重向量,然后不断增加权重向量的大小。我不明白为什么它会尝试增加权重向量的大小
任何帮助将不胜感激!
最佳答案
我猜你的数据是线性可分的? IIRC,逻辑回归在这种情况下就会崩溃。我认为这是一个众所周知的问题。引用自here (谷歌搜索“逻辑回归可分离数据”的第一个点击):
...However, when the training data is linearly separable, two bad things happen: 1. |θ| goes to infinity; 2. There are infinite number of MLE’s. To see this, note any step function (sigmoid with |θ|=∞) that is in the gap between the two classes is an MLE
One way to avoid this is to incorporate a prior on θ in the form of a zero-mean Gaussian with covariance 1/(2λ)I
关于machine-learning - 机器学习中的逻辑回归,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28736050/