kaz-Anova / StackNet

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

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

Closed NagabhushanS closed 7 years ago

NagabhushanS commented 7 years ago

I started using StackNet today. I have sklearn-version 0.19.1 and python 3.6. The StackNet.jar file is in the same folder as the lib (as mentioned in the github page). I am getting an IllegalStateException: Tree is not fitted. The following is the params.txt file:

SklearnMLPClassifier standardize:true use_log1p:true shuffle:true learning_rate:adaptive momentum:0.9 optimizer:sgd use_dense:false alpha:0.000001 hidden:50,50 activation:relu epsilon:0.00000001 max_iter:50 learning_rate_init:0.01 batch_size:8 tol:0.0001 validation_split:0.2 seed:1 verbose:false

RandomForestClassifier estimators=1000 rounding:3 threads:4 max_depth:6 max_features:0.6 min_leaf:2.0 Objective:ENTROPY gamma:0.000001 row_subsample:1.0 verbose:false copy=false

I replaced SklearnMLPClassifier with SklearnRandomForestClassifier, the error still persists. But when I replace SklearnMLPClassifier with any other native classifier, the error is gone. So, I believe the error has something to do with sklearn installation in StackNet.

NagabhushanS commented 7 years ago

I changed the verbose argument of SklearnMLPClassifier to true and found this error "could not locate file 'lib/python/SklearnMLPClassifier.py'". I came to know that it is not obtaining the location of the SklearnMLPClassifier.py file relative to the location of StackNet.jar but instead it is obtaining the path of the SklearnMLPClassifier.py file with respect to current directory. May be this behavior can be changed to avoid confusion.