yasserg / jforests

Automatically exported from code.google.com/p/jforests
67 stars 29 forks source link

Error with RandomForest #11

Open ghost opened 7 years ago

ghost commented 7 years ago

I can build a model using RandomForest but i can't get the scores because i get some errors. If i run with --tree-type=RegressionTree

Exception in thread "main" java.lang.NumberFormatException: For input string: "0.0" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110) at java.lang.Double.parseDouble(Double.java:538) at edu.uci.jforests.util.ArraysUtil.loadDoubleArrayFromLine(ArraysUtil.java:224) at edu.uci.jforests.learning.trees.regression.RegressionTree.loadCustomData(RegressionTree.java:206) at edu.uci.jforests.learning.trees.Ensemble.loadFromFile(Ensemble.java:133) at edu.uci.jforests.applications.Runner.predict(Runner.java:142) at edu.uci.jforests.applications.Runner.main(Runner.java:227)

and if a run with --tree-type=DecisionTree

Exception in thread "main" java.lang.Exception: Invalid input. at edu.uci.jforests.util.ArraysUtil.loadDoubleMatrixFromLine(ArraysUtil.java:232) at edu.uci.jforests.learning.trees.decision.DecisionTree.loadCustomData(DecisionTree.java:112) at edu.uci.jforests.learning.trees.Ensemble.loadFromFile(Ensemble.java:133) at edu.uci.jforests.applications.Runner.predict(Runner.java:144) at edu.uci.jforests.applications.Runner.main(Runner.java:227)

cmacdonald commented 7 years ago

Duplicate of #9