[R] Getting SVM minimized function value
David Meyer
david.meyer at wu-wien.ac.at
Mon Apr 17 13:20:22 CEST 2006
Pau,
the objective value currently is not returned by libsvm; I will drop
Chih-Chen Lin, the author of libsvm, a note on that (it's actually not much
of a work).
However, the C-code can create some debugging output which includes the
objective value, so at least you can get it on the screen. Therefore, you
need to activate a "switch" in src/svm.cpp in the package sources. Almost at
the beginning of the file, you will find:
#if 0
void info(char *fmt,...)
{
va_list ap;
va_start(ap,fmt);
vprintf(fmt,ap);
va_end(ap);
}
void info_flush()
{
fflush(stdout);
}
#else
void info(char *fmt,...) {}
void info_flush() {}
#endif
Just change the
#if 0
to
#if 1
and re-build + re-install the package.
HTH,
David
------------------------
Hello, I have been searching a way to get the resulting optimized
function value of a trained SVM model (svm from the package e1071) but
I have not succeed.
Does anyone knows a way to get that value?
Pau
--
Dr. David Meyer
Department of Information Systems and Operations
Vienna University of Economics and Business Administration
Augasse 2-6, A-1090 Wien, Austria, Europe
Tel: +43-1-313 36 4393
Fax: +43-1-313 36 90 4393
HP: http://wi.wu-wien.ac.at/~meyer/
More information about the R-help
mailing list