Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayIndexOutOfBoundsException & java.lang.NullPointerException #10

Open
SpongebBob opened this issue Jun 1, 2017 · 6 comments
Open

Comments

@SpongebBob
Copy link

SpongebBob commented Jun 1, 2017

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
Copy link

Same issue

@xiaofeifei1800
Copy link

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

@kaz-Anova
Copy link
Owner

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

@xiaofeifei1800
Copy link

I will try today and let you know

@SpongebBob
Copy link
Author

SpongebBob commented Jun 10, 2017

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

@SpongebBob
Copy link
Author

SpongebBob commented Jun 10, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants