You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The best parameter for prob outputs may be different from the setting
without..
See also the following faq
Q: Why using svm-predict -b 0 and -b 1 gives different accuracy values?
Let's just consider two-class classification here. After probability
information is obtained in training, we do not have
prob > = 0.5 if and only if decision value >= 0.
So predictions may be different with -b 0 and 1.
On 2019-09-27 01:22, Zheng Li wrote:
Hi, I use libSVM to develop my face recognition system,I use the
libSVM to find the closet face feature and identify target person,but
I found when I call svm_predict_probability() to do the prediction,the
accuracy is very low,and when I call svm_predict(), the accuracy is
high,because I need the probability param to check similarity , so I
want to know why svm_predict_probability()'s accuracy is so low?
below is my code to create the svm_model:
inline void fillLibSvmNodes(std::vector &fea, std::vector<svm_node>
&line_x_space)
{
size_t featuresNb = fea.size();
assert((fea.size() + 1) == line_x_space.size());
for (int i = 0; i < featuresNb; i++)
{
line_x_space[i].index = i + 1;
line_x_space[i].value = (double)fea[i];
}
line_x_space[featuresNb].index = -1;
}
void testLibSVM()
{
// dbFaceFeatures is a global variable to store the load face
features, it is vector<pair<string,vector>> type,the face feature is
512D;
assert(dbFaceFeatures.size() > 0);
int featuresNb = (int)dbFaceFeatures[0].second.size(); //
featuresNb=512
y_space.resize(dbFaceFeatures.size()); // y_space is vector
type
prob.y = y_space.data();
for (size_t i = 0; i < y_space.size(); i++)
y_space.at(i) = (double)(i + 1);
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub [1], or mute the
thread [2]. [ { "@context": "http://schema.org", "@type":
"EmailMessage", "potentialAction": { "@type": "ViewAction", "target":
"https://github.com//issues/152?email_source=notifications\u0026email_token=ABI3BHWM3YKIZAE6BTHHJCTQLW7DTA5CNFSM4I3DKNV2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HOC2G3A",
"url":
"https://github.com//issues/152?email_source=notifications\u0026email_token=ABI3BHWM3YKIZAE6BTHHJCTQLW7DTA5CNFSM4I3DKNV2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HOC2G3A",
"name": "View Issue" }, "description": "View this Issue on GitHub",
"publisher": { "@type": "Organization", "name": "GitHub", "url":
"https://github.com" } } ]
The best parameter for prob outputs may be different from the setting
without..
See also the following faq
Q: Why using svm-predict -b 0 and -b 1 gives different accuracy values?
Let's just consider two-class classification here. After probability
information is obtained in training, we do not have
prob > = 0.5 if and only if decision value >= 0.
So predictions may be different with -b 0 and 1.
On 2019-09-27 01:22, Zheng Li wrote:
Originally posted by @cjlin1 in #152 (comment)
The text was updated successfully, but these errors were encountered: