本文整理了Java中weka.core.Instances.lastInstance()
方法的一些代码示例,展示了Instances.lastInstance()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instances.lastInstance()
方法的具体详情如下:
包路径:weka.core.Instances
类名称:Instances
方法名:lastInstance
[英]Returns the last instance in the set.
[中]返回集合中的最后一个实例。
代码示例来源:origin: com.googlecode.obvious/obviousx-weka
@Override
public Instance lastInstance() {
return super.lastInstance();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Generate an example of the dataset dataset.
*
* @return the instance generated
* @throws Exception if format not defined or generating <br/>
* examples one by one is not possible, because voting is chosen
*/
@Override
public Instance generateExample() throws Exception {
Random random = getRandom();
Instances format = getDatasetFormat();
if (format == null) {
throw new Exception("Dataset format not defined.");
}
if (getVoteFlag()) {
throw new Exception("Examples cannot be generated one by one.");
}
// generate values for all attributes
format = generateExamples(1, random, format);
return format.lastInstance();
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Generate an example of the dataset dataset.
*
* @return the instance generated
* @throws Exception if format not defined or generating <br/>
* examples one by one is not possible, because voting is chosen
*/
@Override
public Instance generateExample() throws Exception {
Random random = getRandom();
Instances format = getDatasetFormat();
if (format == null) {
throw new Exception("Dataset format not defined.");
}
if (getVoteFlag()) {
throw new Exception("Examples cannot be generated one by one.");
}
// generate values for all attributes
format = generateExamples(1, random, format);
return format.lastInstance();
}
代码示例来源:origin: Waikato/meka
Instance x = D.lastInstance();
D.remove(D.numInstances()-1);
int L = Integer.parseInt(args[1]);
代码示例来源:origin: net.sf.meka/meka
Instance x = D.lastInstance();
D.remove(D.numInstances()-1);
int L = Integer.parseInt(args[1]);
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
if (Utils.gr(weights[j], 0)) {
instances[j].add(instance);
instances[j].lastInstance().
setWeight(weights[j] * instance.weight());
代码示例来源:origin: Waikato/weka-trunk
if (Utils.gr(weights[j], 0)) {
instances[j].add(instance);
instances[j].lastInstance().
setWeight(weights[j] * instance.weight());
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
Instance inst = newTrain.instance(i);
newTrainTransformed.add(inst);
newTrainTransformed.lastInstance().
setClassValue(m_OldIndexToNewIndex[(int)inst.classValue()]);
代码示例来源:origin: Waikato/weka-trunk
Instance inst = newTrain.instance(i);
newTrainTransformed.add(inst);
newTrainTransformed.lastInstance().
setClassValue(m_OldIndexToNewIndex[(int)inst.classValue()]);
内容来源于网络,如有侵权,请联系作者删除!