kaz-Anova / StackNet

StackNet is a computational, scalable and analytical Meta modelling framework
MIT License
1.32k stars 344 forks source link

ArrayIndexOutOfBoundsException & java.lang.NullPointerException #10

Open SpongebBob opened 7 years ago

SpongebBob commented 7 years ago

I encountered this problem with my own features in the Kaggle of Quora、

Exception in thread "Thread-6" java.lang.ArrayIndexOutOfBoundsException: 750 at ml.Tree.DecisionTreeRegressor.expand_node(DecisionTreeRegressor.java:3002) at ml.Tree.DecisionTreeRegressor.expand_node(DecisionTreeRegressor.java:3038) at ml.Tree.DecisionTreeRegressor.expand_node(DecisionTreeRegressor.java:3042) at ml.Tree.DecisionTreeRegressor.expand_node(DecisionTreeRegressor.java:3042) at ml.Tree.DecisionTreeRegressor.expand_node(DecisionTreeRegressor.java:3038) at ml.Tree.DecisionTreeRegressor.expand_node(DecisionTreeRegressor.java:3038) at ml.Tree.DecisionTreeRegressor.expand_node(DecisionTreeRegressor.java:3038) at ml.Tree.DecisionTreeRegressor.expand_node(DecisionTreeRegressor.java:3038) at ml.Tree.DecisionTreeRegressor.fit(DecisionTreeRegressor.java:2382) at ml.Tree.DecisionTreeRegressor.run(DecisionTreeRegressor.java:483) at java.lang.Thread.run(Thread.java:745) Exception in thread "Thread-3" java.lang.NullPointerException at ml.Tree.DecisionTreeRegressor.isfitted(DecisionTreeRegressor.java:3275) at ml.Tree.scoringhelperv2.(scoringhelperv2.java:107) at ml.Tree.RandomForestRegressor.predict2d(RandomForestRegressor.java:744) at ml.Tree.GradientBoostingForestClassifier.fit(GradientBoostingForestClassifier.java:2353) at ml.Tree.GradientBoostingForestClassifier.run(GradientBoostingForestClassifier.java:382) at java.lang.Thread.run(Thread.java:745) Exception in thread "Thread-1112" java.lang.ArrayIndexOutOfBoundsException: 983 at ml.Tree.DecisionTreeClassifier.expand_node(DecisionTreeClassifier.java:3185) at ml.Tree.DecisionTreeClassifier.expand_node(DecisionTreeClassifier.java:3225) at ml.Tree.DecisionTreeClassifier.expand_node(DecisionTreeClassifier.java:3225) at ml.Tree.DecisionTreeClassifier.expand_node(DecisionTreeClassifier.java:3221) at ml.Tree.DecisionTreeClassifier.expand_node(DecisionTreeClassifier.java:3225) at ml.Tree.DecisionTreeClassifier.fit(DecisionTreeClassifier.java:2576) at ml.Tree.DecisionTreeClassifier.run(DecisionTreeClassifier.java:537) at java.lang.Thread.run(Thread.java:745) Exception in thread "Thread-1137" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-1617" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-1642" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-2075" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-2284" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-2365" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-2382" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-2463" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-2608" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-2721" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-2802" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-2883" java.lang.ArrayIndexOutOfBoundsException Exception in thread "Thread-2996" java.lang.ArrayIndexOutOfBoundsException logloss : 0.257352525104832 logloss : 2.4462523363834303 Exception in thread "main" java.lang.NullPointerException at ml.Tree.DecisionTreeClassifier.isfitted(DecisionTreeClassifier.java:3458) at ml.Tree.scoringhelpercatv2.(scoringhelpercatv2.java:107) at ml.Tree.RandomForestClassifier.predict_proba(RandomForestClassifier.java:795) at ml.stacknet.StackNetClassifier.fit(StackNetClassifier.java:3532) at stacknetrun.runstacknet.main(runstacknet.java:437)

I am sure that there is no zero like 0.000000 in the sparse file and all the data is in order。 what's more, I have 489 features. Is it too much? /(ㄒoㄒ)/~~

xiaofeifei1800 commented 7 years ago

Same issue

xiaofeifei1800 commented 7 years ago

@SpongebBob Does it generate querry_pred.csv file? I can't find it.

kaz-Anova commented 7 years ago

Could you care to re-test with the new version?

xiaofeifei1800 commented 7 years ago

I will try today and let you know

SpongebBob commented 7 years ago

@kaz-Anova I add rounding=30 to the tree based model, the bug is gone!

SpongebBob commented 7 years ago

@xiaofeifei1800 If you use tree based model, try to add param rounding. It worked for me.