使用SGDClassifier的对象检测框架

时间:2015-06-02 10:14:59

标签: opencv machine-learning scikit-learn svm object-detection

我正在尝试使用HOG + LinearSVM [dalal,triggs,2005]实现标准框架SGDClassifier from sklearn

我正在尝试使用SGDClassifier的partial_fit方法通过在线迭代学习来模仿'hard negatives mining'过程。 我计算新的N个随机负样本并且每次迭代都有相同的N个正样本。(所以我有N个正数,N个负数=平衡数据集)

我像这样定义分类:

clf = linear_model.SGDClassifier(shuffle=True, n_iter= 1,verbose=1)

和输出是这样的:

iter1:
-- Epoch 1
Norm: 27.85, NNZs: 144, Bias: -0.065013, T: 50, Avg. loss: 1.754196
Total training time: 0.00 seconds.

iter2:
-- Epoch 1
Norm: 39.46, NNZs: 144, Bias: -0.117644, T: 50, Avg. loss: 0.282976
Total training time: 0.00 seconds.

iter3:
-- Epoch 1
Norm: 37.74, NNZs: 144, Bias: -0.117644, T: 50, Avg. loss: 0.000000
Total training time: 0.00 seconds.

iter4:
-- Epoch 1
Norm: 36.17, NNZs: 144, Bias: -0.117644, T: 50, Avg. loss: 0.000000
Total training time: 0.00 seconds.

当classifer达到损失= 0.0时,所有样本分类为负数,损失= 0.0意味着什么,我做错了什么?

0 个答案:

没有答案