Write a program in Java to access the kddcup99 dataset and use the following code to obtain instances,
Public static instances getarfffile (string filename) throws exception
{
Datasource source = new datasource (filename );
Instances ins = source. getdataset ();
If (INS. classindex () =-1)
INS. setclassindex (INS. numattributes ()-1); // This sentence must not be less
// System. Out. println ("\ n" + filename + "after the dataset is read, the total number of samples is:" + INS. numinstances () +! \ N ");
Return INS;
}
The result is as follows:
Exception in thread "Main" Java. Lang. outofmemoryerror: Java heap Space
At sun. Misc. floatingdecimal. readjavaformatstring (unknown source)
At java. Lang. Double. valueof (unknown source)
At WEKA. Core. converters. arffloader $ arffreader. getinstancefull (unknown source)
At WEKA. Core. converters. arffloader $ arffreader. getinstance (unknown source)
At WEKA. Core. converters. arffloader $ arffreader. readinstance (unknown source)
At WEKA. Core. converters. arffloader $ arffreader. readinstance (unknown source)
At WEKA. Core. converters. arffloader. getdataset (unknown source)
At WEKA. Core. converters. converterutils $ datasource. getdataset (unknown source)
At conceptdrift. Detection. method. read_copy_arff.getarfffile (read_copy_arff.java: 24)
At conceptdrift. Detection. method. read_copy_arff.main (read_copy_arff.java: 35)
Modify the-xmx 256 m of eclipse. ini to-xmx1024m, and double-click eclipse.exe.
But if it is changed to -xmx512, the eclipse.exe can be opened smoothly. I don't know what's going on?