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

java.lang.IllegalStateException: Tree is not fitted #28

Closed
vinkaga opened this issue Sep 14, 2017 · 2 comments
Closed

java.lang.IllegalStateException: Tree is not fitted #28

vinkaga opened this issue Sep 14, 2017 · 2 comments

Comments

@vinkaga
Copy link

vinkaga commented Sep 14, 2017

I am getting this error on Mac. The console output is

$ java -Xmx12048m -jar StackNet.jar train task=regression sparse=true has_head=false output_name=datasettwo model=model2 pred_file=pred2.csv train_file=dataset2_train.txt test_file=dataset2_test.txt test_target=false params=dataset2_params.txt verbose=true threads=1 metric=mae stackdata=false seed=1 folds=4 bins=3
parameter name : task value :  regression
parameter name : sparse value :  true
parameter name : has_head value :  false
parameter name : output_name value :  datasettwo
parameter name : model value :  model2
parameter name : pred_file value :  pred2.csv
parameter name : train_file value :  dataset2_train.txt
parameter name : test_file value :  dataset2_test.txt
parameter name : test_target value :  false
parameter name : params value :  dataset2_params.txt
parameter name : verbose value :  true
parameter name : threads value :  1
parameter name : metric value :  mae
parameter name : stackdata value :  false
parameter name : seed value :  1
parameter name : folds value :  4
parameter name : bins value :  3
[4793209, 88528]
 Loaded File: dataset2_train.txt
 Total rows in the file: 88528
 Total columns in the file: undetrmined-Sparse
 Number of elements : 4793209
 The filedataset2_train.txt was loaded successfully with :
 Rows : 88528
 Columns (excluding target) : 1
 Delimeter was  :
Loaded sparse train data with 88528 and columns 58
 loaded data in : 6.587000
 Binning parameters
[-0.0131, <=-0.0131]
[0.0247, <=0.0247]
[0.4187, <=0.4187]
 Level: 1 dimensionality: 12
 Starting cross validation
Fitting model : 0
 mae : 0.0534568661948753
Fitting model : 1
 mae : 0.0531896123303922
Fitting model : 2
 mae : 0.053078546424724905
Fitting model : 3
 mae : 0.053564587280493355
Fitting model : 4
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.IllegalStateException:  Tree is not fitted
	at ml.Bagging.scoringhelperbagv2.<init>(scoringhelperbagv2.java:109)
	at ml.Bagging.BaggingRegressor.predict2d(BaggingRegressor.java:669)
	at ml.Bagging.BaggingRegressor.predict_proba(BaggingRegressor.java:1875)
	at ml.stacknet.StackNetRegressor.fit(StackNetRegressor.java:3065)
	at stacknetrun.runstacknet.main(runstacknet.java:522)
	... 5 more

Python version 3.6.1
Java version: 1.8.0_121

Any suggestions on how to get around this issue?

@kaz-Anova
Copy link
Owner

You may read how to install xgboost here (and check that it works fine)

Also see this issue if problem persists.

@vinkaga
Copy link
Author

vinkaga commented Sep 14, 2017

Thanks for extremely fast response! I had gcc-7 on my computer. Copying dylibs from 7 to 6 did the trick :-)

$ pwd
/usr/local/Cellar/gcc/7.2.0/lib/gcc
$ sudo cp -r 7 6

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

2 participants