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

[FIX] Predictions: allow predicting probabilities for classless data #5972

Merged
merged 2 commits into from
May 17, 2022

Conversation

markotoplak
Copy link
Member

Issue

Fixed #5970

Description of changes

Before, combo box for selection of class probabilities was only shown if the data on the input had a dicrete class. Now, the combo is shown as soon as there is one predictor which works with discrete class vars. If class is missing from the file, only model probabilities options are shown there.

Includes
  • Code changes
  • Tests
  • Documentation

@markotoplak markotoplak force-pushed the fix-prediction-classless branch 2 times, most recently from b1f27c6 to b37dd21 Compare May 13, 2022 13:00
@markotoplak markotoplak changed the title Predictions: allow predicting probabilities for classless data [RFC] Predictions: allow predicting probabilities for classless data May 13, 2022
@markotoplak markotoplak changed the title [RFC] Predictions: allow predicting probabilities for classless data [FIX] Predictions: allow predicting probabilities for classless data May 13, 2022
@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #5972 (f86ed47) into master (41999e5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #5972   +/-   ##
=======================================
  Coverage   86.40%   86.40%           
=======================================
  Files         315      315           
  Lines       67142    67158   +16     
=======================================
+ Hits        58014    58029   +15     
- Misses       9128     9129    +1     

widget.setVisible(self.is_discrete_class)
widget.setVisible(any((slot.predictor.domain.class_var is not None and
slot.predictor.domain.class_var.is_discrete)
for slot in self.predictors))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer

widget.setVisible(self.is_discrete_class
                  or any(slot.predictor.domain.has_discrete_class for slot in selt.predictors))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Fixed. Thanks.

Before, combo box for selection of class probabilities was only shown if the
data on the input had a dicrete class. Now, the combo is shown as soon as
there is one predictor which works with discrete class vars. If class is
missing from the file, only model probabilities options are shown there.
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

Successfully merging this pull request may close these issues.

Predictions do not show or output probabilities if there is no class present
2 participants