weka.core.Utils.round()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中weka.core.Utils.round()方法的一些代码示例,展示了Utils.round()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.round()方法的具体详情如下:
包路径:weka.core.Utils
类名称:Utils
方法名:round

Utils.round介绍

[英]Rounds a double to the next nearest integer value. The JDK version of it doesn't work properly.
[中]

代码示例

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

System.out.println("log2(4.6): " + Utils.log2(4.6));
System.out.println("5 * log(5): " + Utils.xlogx(5));
System.out.println("5.5 rounded: " + Utils.round(5.5));
System.out.println("5.55555 rounded to 2 decimal places: "
 + Utils.roundDouble(5.55555, 2));

代码示例来源:origin: Waikato/weka-trunk

int trainSize = Utils.round(runInstances.numInstances()
 * m_TrainPercent / 100);
int testSize = runInstances.numInstances() - trainSize;

代码示例来源:origin: Waikato/weka-trunk

System.out.println("log2(4.6): " + Utils.log2(4.6));
System.out.println("5 * log(5): " + Utils.xlogx(5));
System.out.println("5.5 rounded: " + Utils.round(5.5));
System.out.println("5.55555 rounded to 2 decimal places: "
 + Utils.roundDouble(5.55555, 2));

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

int trainSize = Utils.round(runInstances.numInstances()
 * m_TrainPercent / 100);
int testSize = runInstances.numInstances() - trainSize;

相关文章