本文整理了Java中weka.core.Instances.swap()
方法的一些代码示例,展示了Instances.swap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instances.swap()
方法的具体详情如下:
包路径:weka.core.Instances
类名称:Instances
方法名:swap
[英]Swaps two instances in the set.
[中]交换集合中的两个实例。
代码示例来源:origin: com.googlecode.obvious/obviousx-weka
@Override
public void swap(int i, int j) {
super.swap(i, j);
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Shuffles the instances in the set so that they are ordered randomly.
*
* @param random a random number generator
*/
public void randomize(Random random) {
for (int j = numInstances() - 1; j > 0; j--) {
swap(j, random.nextInt(j + 1));
}
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Shuffles the instances in the set so that they are ordered randomly.
*
* @param random a random number generator
*/
public void randomize(Random random) {
for (int j = numInstances() - 1; j > 0; j--) {
swap(j, random.nextInt(j + 1));
}
}
代码示例来源:origin: Waikato/weka-trunk
m_canopies.swap(i, m_canopies.numInstances() - 1);
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
m_canopies.swap(i, m_canopies.numInstances() - 1);
代码示例来源:origin: Waikato/weka-trunk
m_trainingData.swap(j, instIndex);
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
m_trainingData.swap(j, instIndex);
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
if ((instance1.classValue() == instance2.classValue())
|| (instance1.classIsMissing() && instance2.classIsMissing())) {
swap(index, j);
index++;
代码示例来源:origin: Waikato/weka-trunk
if ((instance1.classValue() == instance2.classValue())
|| (instance1.classIsMissing() && instance2.classIsMissing())) {
swap(index, j);
index++;
代码示例来源:origin: net.sf.meka.thirdparty/mulan
initC.put(hk, null);
instances.swap(j, instIndex);
if (m_ClusterCentroids.numInstances() == m_NumClusters) {
break;
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
initC.put(hk, null);
initInstances.swap(j, instIndex);
代码示例来源:origin: Waikato/weka-trunk
initC.put(hk, null);
initInstances.swap(j, instIndex);
内容来源于网络,如有侵权,请联系作者删除!