Hi,
I have the newest copy of smile.jar for 32-bit linux.
It compiles fine but when I try to run it I get the error:
java -classpath ./smile.jar:. -Djava.library.path=. NaiveLearner
Exception in thread "main" smile.SMILEException: SMILE error -1 in function Learn
at smile.learning.NaiveBayes.learn(Native Method)
at NaiveLearner.main(naive_learner.java:24)
Here is my code:
class NaiveLearner{
public static void main(String[] args) {
Network net1 = new Network();
NaiveBayes naive = new NaiveBayes();
DataSet d = new DataSet();
d.readFile("naive.txt");
naive.setClassVariableId("type");
net1 = naive.learn(d);
net1.writeFile("naive_example.xdsl");
}
}
I might have just done something stupid, so sorry about that. Thanks in advance for the help!
Issue with function "learn" SMILE error -1
Re: Issue with function "learn" SMILE error -1
Hi Sumin,
Most likely you'll need to correct:
naive.setClassVariableId("type");
Check if the column name is exactly "type"
To be safe you could check if the input file works properly in GeNIe.
Best,
Martijn
Most likely you'll need to correct:
naive.setClassVariableId("type");
Check if the column name is exactly "type"
To be safe you could check if the input file works properly in GeNIe.
Best,
Martijn
Re: Issue with function "learn" SMILE error -1
Thanks a lot - that did the trick.