Commit 4324b77a authored by Jussi Lindgren's avatar Jussi Lindgren
Browse files

Plugins: Fixed probability output of the SVM classifier

The classifier should now return a probability vector with
size equalling the number of classes in training.
parent 2a6919e7
......@@ -368,20 +368,16 @@ boolean CAlgorithmClassifierSVM::classify(const IFeatureVector& rFeatureVector,
//If we are not in these mode, label is NULL and there is no probability
//If we are not in these modes, label is NULL and there is no probability
if(m_pModel->param.svm_type == C_SVC || m_pModel->param.svm_type == NU_SVC)
this->getLogManager() << LogLevel_Trace <<"Label predict: "<<rf64Class<<"\n";
for(int i=0;i<m_pModel->nr_class;i++)
this->getLogManager() << LogLevel_Trace << "index:"<<i<<" label:"<< m_pModel->label[i]<<" probability:"<<l_pProbEstimates[i]<<"\n";
if( m_pModel->label[i] == 1 )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment