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

Error in generateFeatureImportanceBarGraph #22

Closed
JensBlack opened this issue Apr 7, 2020 · 3 comments
Closed

Error in generateFeatureImportanceBarGraph #22

JensBlack opened this issue Apr 7, 2020 · 3 comments

Comments

@JensBlack
Copy link
Contributor

Describe the bug
After starting the training with the following settings, the error occured.

grafik

[Parallel(n_jobs=-1)]: Using backend ThreadingBackend with 12 concurrent workers.
[Parallel(n_jobs=-1)]: Done  26 tasks      | elapsed:    8.9s
[Parallel(n_jobs=-1)]: Done 176 tasks      | elapsed:   51.3s
[Parallel(n_jobs=-1)]: Done 426 tasks      | elapsed:  2.1min
[Parallel(n_jobs=-1)]: Done 776 tasks      | elapsed:  3.7min
[Parallel(n_jobs=-1)]: Done 1226 tasks      | elapsed:  5.8min
[Parallel(n_jobs=-1)]: Done 1776 tasks      | elapsed:  8.4min
[Parallel(n_jobs=-1)]: Done 2000 out of 2000 | elapsed:  9.4min finished
[Parallel(n_jobs=12)]: Using backend ThreadingBackend with 12 concurrent workers.
[Parallel(n_jobs=12)]: Done  26 tasks      | elapsed:    0.0s
[Parallel(n_jobs=12)]: Done 176 tasks      | elapsed:    0.2s
[Parallel(n_jobs=12)]: Done 426 tasks      | elapsed:    0.5s
[Parallel(n_jobs=12)]: Done 776 tasks      | elapsed:    1.0s
[Parallel(n_jobs=12)]: Done 1226 tasks      | elapsed:    1.6s
[Parallel(n_jobs=12)]: Done 1776 tasks      | elapsed:    2.4s
[Parallel(n_jobs=12)]: Done 2000 out of 2000 | elapsed:    2.7s finished
[Parallel(n_jobs=12)]: Using backend ThreadingBackend with 12 concurrent workers.
[Parallel(n_jobs=12)]: Done  26 tasks      | elapsed:    0.0s
[Parallel(n_jobs=12)]: Done 176 tasks      | elapsed:    0.2s
[Parallel(n_jobs=12)]: Done 426 tasks      | elapsed:    0.5s
[Parallel(n_jobs=12)]: Done 776 tasks      | elapsed:    1.0s
[Parallel(n_jobs=12)]: Done 1226 tasks      | elapsed:    1.6s
[Parallel(n_jobs=12)]: Done 1776 tasks      | elapsed:    2.4s
[Parallel(n_jobs=12)]: Done 2000 out of 2000 | elapsed:    2.7s finished
[Parallel(n_jobs=12)]: Using backend ThreadingBackend with 12 concurrent workers.
[Parallel(n_jobs=12)]: Done  26 tasks      | elapsed:    0.0s
[Parallel(n_jobs=12)]: Done 176 tasks      | elapsed:    0.2s
[Parallel(n_jobs=12)]: Done 426 tasks      | elapsed:    0.5s
[Parallel(n_jobs=12)]: Done 776 tasks      | elapsed:    1.0s
[Parallel(n_jobs=12)]: Done 1226 tasks      | elapsed:    1.6s
[Parallel(n_jobs=12)]: Done 1776 tasks      | elapsed:    2.3s
[Parallel(n_jobs=12)]: Done 2000 out of 2000 | elapsed:    2.6s finished
Exception in thread Thread-7:
Traceback (most recent call last):
  File "D:\Anaconda\envs\simba-gpu\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "D:\Anaconda\envs\simba-gpu\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "simba.py", line 3737, in trainsinglemodel
    trainmodel2(self.projectconfigini)
  File "C:\Users\schwa\PycharmProjects\simba\simba\train_model_2.py", line 302, in trainmodel2
    generateFeatureImportanceBarGraph(log_df, N_feature_importance_bars)
UnboundLocalError: local variable 'log_df' referenced before assignment

Additional context
I guess this is an error based on the missing selection/toggle of "Generate Features Importance Log". Do you need to select both?

@JensBlack
Copy link
Contributor Author

I add the part from the tutorial for future reference and readability.
Quote from the Readme (Generic SimBA Tutorial, 07.04.2020):

Generate Features Importance Log: Creates a .csv file that lists the importance's (gini importances) of all features for the classifier.

Generate Features Importance Bar Graph: Creates a bar chart of the top N features based on gini importances. Specify N in the N feature importance bars entry box below.

N feature importance bars: Integer defining the number of top features to be included in the bar graph (e.g., 15).

@sgoldenlab
Copy link
Owner

Thanks @JensBlack - as i think you got, the graph can't be created without the generate feature importance log. I will look to add a feature in the GUI to grey the Generate Feature importance bar graph out unless the generate feature importance log is ticked.

@JensBlack
Copy link
Contributor Author

Okay, with both options enabled and a valid value entered the bars plotted just fine. I will close this issue then.

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