问题描述
我正在 java 中使用libsvm,并且遇到了(适用于python).
I am using libsvm in java and am experiencing similar issues as described here for python.
在培训和预测过程中,我将获得大量控制台输出,并希望将其禁用.可悲的是,由于服务暂时不可用",我无法访问可能描述该网站的网站(此处).我找不到一种与Java相关的方式来禁用此警告(如果我确实忽略了我的歉意)
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:
您知道如何在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)中禁用控制台输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!