如何在libsvm(java)中禁用控制台输出 [英] How to disable the console output in libsvm (java)
问题描述
I am using libsvm in java and am experiencing similar issues as described here for python.
在培训和预测过程中,我将获得大量控制台输出,并希望将其禁用.可悲的是,由于服务暂时不可用",我无法访问可能描述该网站的网站(
I am getting a lot of console output during training and prediction and would like to disable it. Sadly, due to a "Service Temporary Unavaiable" I can't access the website, where it might be described (here). I couldn't find a java related way to disable this warnings (If I did oversee something I apologize)
输出总是看起来很像这样:
The Output always looks quite similar to this:
优化完成,#iter = 10000000 nu = 0.013178458659415372 obj = -11.005078334927212,rho = -2.1799731001804696 nSV = 20,nBSV = 5 总nSV = 20
optimization finished, #iter = 10000000 nu = 0.013178458659415372 obj = -11.005078334927212, rho = -2.1799731001804696 nSV = 20, nBSV = 5 Total nSV = 20
您知道如何在Java中禁用此类输出吗?
Do you know how I can disable this kind of output in java?
非常感谢您的帮助.
推荐答案
要以编程方式禁用输出,您需要执行以下操作:
To disable output programmatically you need to do the following:
svm.svm_set_print_string_function(new libsvm.svm_print_interface(){
@Override public void print(String s) {} // Disables svm output
});
这篇关于如何在libsvm(java)中禁用控制台输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!