EdwardRaff / JSAT

Java Statistical Analysis Tool, a Java library for Machine Learning
GNU General Public License v3.0
789 stars 205 forks source link

Cannot load arff file #59

Closed Microsamp closed 7 years ago

Microsamp commented 7 years ago

Hey, i tried to load my new arff file, but i'm getting the following stacktrace:

java.lang.NullPointerException at jsat.ARFFLoader.loadArffFile(ARFFLoader.java:182)

my file: test4.arff

https://hastebin.com/ewopaxateh.pl

My maven dependencie:

[dependency] [groupId>com.edwardraff</groupId] [artifactId>JSAT</artifactId] [version>0.0.6[/version] [/dependency]

My Code: File in = new File("test4.arff"); SimpleDataSet simpleDataSet = ARFFLoader.loadArffFile(new FileReader(in));

Microsamp commented 7 years ago

Ok, i found the following line: 1.551119433032508,0.19167404120454595,1.2476491063357202,"Missing Value"

I think that's the issue. I'm trying to delete all this lines and to import the file again.

EdwardRaff commented 7 years ago

That is indeed the issue, that makes it an invalid arff file. Missing values are denoted with "?". See this for more info.