AutoViML / Auto_ViML

Automatically Build Multiple ML Models with a Single Line of Code. Created by Ram Seshadri. Collaborators Welcome. Permission Granted upon Request.
Apache License 2.0
526 stars 102 forks source link

Getting unboundlocalerror when setting Boosting_flag=True #6

Closed Naseer5543 closed 4 years ago

Naseer5543 commented 4 years ago

Getting error when trying to use xgboost.

File "C:\ProgramData\Anaconda3\lib\site-packages\autoviml\Auto_ViML.py", line 1242, in Auto_ViML print('%d-fold Cross Validation %s = %0.1f%%' %(n_splits,scoring_parameter, best_score*100))

UnboundLocalError: local variable 'best_score' referenced before assignment

AutoViML commented 4 years ago

Can you check if it is happening for all data sets or just one specific dataset? In that case, can you please send me a Colab or Github link with your data so I can debug why and where it is happening ? Make sure you set the Colab share settings to my email address on my main GitHub page. Thanks Ram

On Fri, Jan 3, 2020 at 1:20 AM Naseer Mohammed notifications@github.com wrote:

Getting error when trying to use xgboost.

File "C:\ProgramData\Anaconda3\lib\site-packages\autoviml\Auto_ViML.py", line 1242, in Auto_ViML print('%d-fold Cross Validation %s = %0.1f%%' %(n_splits,scoring_parameter, best_score*100))

UnboundLocalError: local variable 'best_score' referenced before assignment

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AutoViML/Auto_ViML/issues/6?email_source=notifications&email_token=AMKBH6GTGMOLAMAHB2QTL2DQ33KJTA5CNFSM4KCJ76D2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IDZ76TA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMKBH6B7TLLKS7CHWTNNUULQ33KJTANCNFSM4KCJ76DQ .

Naseer5543 commented 4 years ago

Hello, yes i have checked on two datasets 1) Titanic, 2) Santander dataset of kaggle.(train & test) I'm currently running the syntax in spyder. But in colab, it is giving below error. TypeError: fit() got an unexpected keyword argument 'silent'

I have shared the colab to your yahoo mail.

AutoViML commented 4 years ago

This problem has been fixed. Do a "pip install autoviml" again in Colab and you should see a new version with version number 0.1.470. If you still encounter this problem, let me know.

Naseer5543 commented 4 years ago

Hello, In colab, it is working fine but in Spyder & Jupyter notebook. it is throwing below error.

UnboundLocalError                         Traceback (most recent call last)
<ipython-input-5-353441b655d6> in <module>
      5                                            Binning_Flag=False,
      6                                            Stacking_Flag=False,Imbalanced_Flag=True,
----> 7                                            verbose=2)

C:\ProgramData\Anaconda3\lib\site-packages\autoviml\Auto_ViML.py in Auto_ViML(train, target, test, sample_submission, hyper_param, feature_reduction, scoring_parameter, Boosting_Flag, KMeans_Featurizer, Add_Poly, Stacking_Flag, Binning_Flag, Imbalanced_Flag, verbose)
   1256         ### Find what the order of best params are and set the same as the original model ###
   1257         if hyper_param == 'RS' or hyper_param == 'GS':
-> 1258             print('    Best Parameters for Model = %s' %model.best_params_)
   1259         else:
   1260             #### CatBoost does not need Hyper Parameter tuning => it's great out of the box!

UnboundLocalError: local variable 'model' referenced before assignment
AutoViML commented 4 years ago

Naseer Can you check if the version when you load Auto_ViML prints out the same version number in both Colab and Spyder? If the version numbers are different then you have your answer right there. If the versions are the exact same, then it may be some other problem. Please let me know.

On Sat, Jan 4, 2020 at 12:49 AM Naseer Mohammed notifications@github.com wrote:

Hello, In colab, it is working fine but in Spyder & Jupyter notebook. it is throwing below error.

UnboundLocalError Traceback (most recent call last)

in 5 Binning_Flag=False, 6 Stacking_Flag=False,Imbalanced_Flag=True, ----> 7 verbose=2) C:\ProgramData\Anaconda3\lib\site-packages\autoviml\Auto_ViML.py in Auto_ViML(train, target, test, sample_submission, hyper_param, feature_reduction, scoring_parameter, Boosting_Flag, KMeans_Featurizer, Add_Poly, Stacking_Flag, Binning_Flag, Imbalanced_Flag, verbose) 1256 ### Find what the order of best params are and set the same as the original model ### 1257 if hyper_param == 'RS' or hyper_param == 'GS': -> 1258 print(' Best Parameters for Model = %s' %model.best_params_) 1259 else: 1260 #### CatBoost does not need Hyper Parameter tuning => it's great out of the box! UnboundLocalError: local variable 'model' referenced before assignment — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub , or unsubscribe .