Java 类weka.core.Debug.Random 实例源码

项目:inteligencia-artificial-fatecpg    文件:KNearestNeighbor.java   
private Instances prepareDataSource(String dataSourceName, int classIndex){
    Instances dataSource = null; 
    try {
        dataSource = new Instances(new FileReader(dataSourceName));
        dataSource.setClassIndex(classIndex);
        dataSource.resample(new Random());
    } catch (Exception e) {
        e.printStackTrace();
    }
    return dataSource;
}
项目:inteligencia-artificial-fatecpg    文件:NearestNeighbor.java   
private Instances prepareDataSource(String dataSourceName, int classIndex){
    Instances dataSource = null; 
    try {
        dataSource = new Instances(new FileReader(dataSourceName));
        dataSource.setClassIndex(classIndex);
        dataSource.resample(new Random());
    } catch (Exception e) {
        e.printStackTrace();
    }
    return dataSource;
}