0
weka 및 java 코드로 클러스터에서 인스턴스를 가져 오는 방법은 무엇입니까?클러스터에서 인스턴스 가져 오기
이것은 내 코드입니다. 나는 cl 인스턴스를 얻고 싶습니다. 어떻게 이루어 집니까?
public Clustering(String filename) throws Exception {
ClusterEvaluation eval;
Instances data;
String[] options;
DensityBasedClusterer cl;
data = new Instances(new BufferedReader(new FileReader(filename)));
// normal
System.out.println("\n--> normal");
options = new String[2];
options[0] = "-t";
options[1] = filename;
System.out.println(ClusterEvaluation.evaluateClusterer(new EM(), options));
// manual call
System.out.println("\n--> manual");
cl = new EM();
cl.buildClusterer(data);
}
파일 이름 = "C : /Users/User/Desktop/file.arff"
많은 문자열에서 인스턴스를 작성하려면 어떻게해야합니까? – user3800610