/** * for testing only - takes a data file as input. * * @param args the commandline arguments * @throws Exception if something goes wrong */ public static void main(String[] args) throws Exception { if (args.length != 1) { System.out.println("\nUsage: " + DataSource.class.getName() + " <file>\n"); System.exit(1); } DataSource loader = new DataSource(args[0]); System.out.println("Incremental? " + loader.isIncremental()); System.out.println("Loader: " + loader.getLoader().getClass().getName()); System.out.println("Data:\n"); Instances structure = loader.getStructure(); System.out.println(structure); while (loader.hasMoreElements(structure)) { System.out.println(loader.nextElement(structure)); } Instances inst = loader.getDataSet(); loader = new DataSource(inst); System.out.println("\n\nProxy-Data:\n"); System.out.println(loader.getStructure()); while (loader.hasMoreElements(structure)) { System.out.println(loader.nextElement(inst)); } }
/** * for testing only - takes a data file as input. * * @param args the commandline arguments * @throws Exception if something goes wrong */ public static void main(String[] args) throws Exception { if (args.length != 1) { System.out.println("\nUsage: " + DataSource.class.getName() + " <file>\n"); System.exit(1); } DataSource loader = new DataSource(args[0]); System.out.println("Incremental? " + loader.isIncremental()); System.out.println("Loader: " + loader.getLoader().getClass().getName()); System.out.println("Data:\n"); Instances structure = loader.getStructure(); System.out.println(structure); while (loader.hasMoreElements(structure)) { System.out.println(loader.nextElement(structure)); } Instances inst = loader.getDataSet(); loader = new DataSource(inst); System.out.println("\n\nProxy-Data:\n"); System.out.println(loader.getStructure()); while (loader.hasMoreElements(structure)) { System.out.println(loader.nextElement(inst)); } }
while (input.hasMoreElements(data)) { inst = input.nextElement(data); if (debug) {
if (updateable) { clusterer.buildClusterer(source.getStructure()); while (source.hasMoreElements(train)) { inst = source.nextElement(train); ((UpdateableClusterer) clusterer).updateClusterer(inst); clusterer.buildClusterer(clusterTrain); trainHeader = clusterTrain; while (source.hasMoreElements(train)) { inst = source.nextElement(train); removeClass.input(inst);
if (updateable) { clusterer.buildClusterer(source.getStructure()); while (source.hasMoreElements(train)) { inst = source.nextElement(train); ((UpdateableClusterer) clusterer).updateClusterer(inst); clusterer.buildClusterer(clusterTrain); trainHeader = clusterTrain; while (source.hasMoreElements(train)) { inst = source.nextElement(train); removeClass.input(inst);
while (firstInput.hasMoreElements(firstData)) { inst = firstInput.nextElement(firstData); if (filter.input(inst)) { while (secondInput.hasMoreElements(secondData)) { inst = secondInput.nextElement(secondData); if (filter.input(inst)) {
while (input.hasMoreElements(data)) { inst = input.nextElement(data); if (debug) {
: new Instances(source.getStructure(), 0); i = 0; while (source.hasMoreElements(testRaw)) {
while (source1.hasMoreElements(structure)) { System.out.println(source1.nextElement(structure)); while (source2.hasMoreElements(structure)) { System.out.println(source2.nextElement(structure));
while (firstInput.hasMoreElements(firstData)) { inst = firstInput.nextElement(firstData); if (filter.input(inst)) { while (secondInput.hasMoreElements(secondData)) { inst = secondInput.nextElement(secondData); if (filter.input(inst)) {
: new Instances(source.getStructure(), 0); i = 0; while (source.hasMoreElements(testRaw)) {
while (source1.hasMoreElements(structure)) { System.out.println(source1.nextElement(structure)); while (source2.hasMoreElements(structure)) { System.out.println(source2.nextElement(structure));
while (source.hasMoreElements(structure)) { inst = source.nextElement(structure); if (forBatchPredictors != null) {
while (source.hasMoreElements(instances)) { instance = source.nextElement(instances); if (m_clusterAssignments[i] >= 0) {
while (source.hasMoreElements(structure)) { inst = source.nextElement(structure); if (forBatchPredictors != null) {
.implementsMoreEfficientBatchPrediction()) ? new Instances( source.getStructure(), 0) : null; while (source.hasMoreElements(structure)) { inst = source.nextElement(structure); if (forBatchPredictors != null) {
while (source.hasMoreElements(instances)) { instance = source.nextElement(instances); if (m_clusterAssignments[i] >= 0) {
.implementsMoreEfficientBatchPrediction()) ? new Instances( source.getStructure(), 0) : null; while (source.hasMoreElements(structure)) { inst = source.nextElement(structure); if (forBatchPredictors != null) {
while (testset.hasMoreElements(test)) { inst = testset.nextElement(test); printClassification(classifier.distributionForInstance(inst), preProcessInstance(inst, classifier), i);
while (testset.hasMoreElements(test)) { inst = testset.nextElement(test); printClassification(classifier.distributionForInstance(inst), preProcessInstance(inst, classifier), i);