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] Calibration: Fix crash on empty folds #5859

Merged
merged 2 commits into from
Feb 25, 2022

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Feb 25, 2022

Issue

Fixes #5854.

Description of changes

The problem was essentially in Predictions, which created a malformed instance of Results. Folds should be [...], not None.

  • Fixed Predictions to output proper folds.
  • Add models to Results that come from Predictions, so they can be calibrated by Calibration
  • Make Calibration more resilient -- accept folds=None if any other widget misbehaves in the same way as Predictions
Includes
  • Code changes
  • Tests

@codecov
Copy link

codecov bot commented Feb 25, 2022

Codecov Report

Merging #5859 (b817423) into master (5c5c3be) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5859      +/-   ##
==========================================
- Coverage   86.28%   86.28%   -0.01%     
==========================================
  Files         315      315              
  Lines       66797    66798       +1     
==========================================
  Hits        57636    57636              
- Misses       9161     9162       +1     

Copy link
Contributor

@VesnaT VesnaT left a comment

Choose a reason for hiding this comment

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

Can you please rebase and change the comment, and I'll merge.

@patch("Orange.widgets.evaluate.owcalibrationplot.ThresholdClassifier")
@patch("Orange.widgets.evaluate.owcalibrationplot.CalibratedLearner")
def test_no_folds(self, *_):
"""Warn about omitted points with nan probabiities"""
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment is not correct.

@VesnaT VesnaT merged commit 2779699 into biolab:master Feb 25, 2022
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.

Calibration Plot: TypeError after connecting to predictions
2 participants