[ENH] Feature as Predictor#6852
Merged
markotoplak merged 2 commits intobiolab:masterfrom Jun 13, 2025
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6852 +/- ##
==========================================
+ Coverage 88.73% 88.76% +0.03%
==========================================
Files 332 334 +2
Lines 73451 73676 +225
==========================================
+ Hits 65178 65402 +224
- Misses 8273 8274 +1 🚀 New features to boost your workflow:
|
e6c0c49 to
62d47f2
Compare
62d47f2 to
2c09a68
Compare
ec278bd to
bccbd34
Compare
91afd14 to
06841a9
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new widget, Feature as Predictor, which repurposes a table column (numeric or discrete) to generate evaluation results and outputs a corresponding model. Key changes include new i18n message entries, widget UI and behavior modifications in owfeatureaspredictor.py along with extensive test coverage, and updates to modelling and classification modules to support the new widget.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| i18n/si/msgs.jaml | Added new translation messages for column learner/model errors. |
| Orange/widgets/evaluate/owfeatureaspredictor.py | Implemented the new widget with control updates and commit logic. |
| Orange/widgets/evaluate/tests/test_owfeatureaspredictor.py | Added tests to verify behavior and UI interaction of the widget. |
| Orange/modelling/column.py | Introduced ColumnLearner/ColumnModel with logistic and linear paths. |
| Orange/tests/test_classification.py | Updated tests to account for ColumnLearner behavior changes. |
| Orange/modelling/tests/test_column.py | Added tests validating column modelling functionality. |
| Orange/classification/tests/test_column.py | Added tests ensuring ColumnClassifier handles mapping and predictions. |
| Orange/modelling/init.py and classification/init.py | Updated exports to include new column modules. |
Comments suppressed due to low confidence (1)
Orange/modelling/column.py:99
- The criteria for setting the 'value_mapping' in ColumnModel relies on an implicit slice comparison between 'class_var.values' and 'column.values', which may be fragile if the ordering or lengths differ. Consider adding a clarifying comment or refactoring this logic to explicitly document the intended mapping behavior.
if (column.is_discrete and class_var.values[:len(column.values)] != column.values):
85569fa to
0c36cf7
Compare
7c61b51 to
4badd5f
Compare
4badd5f to
3f68b3b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Closes #6813.
Description of changes
A widget that "predicts" classes from a single column. I have several questions.
I've put the widget into category Evaluate. This is not a model but rather a trick to turn a Table into Evaluation Results, hence it belongs there because any user interested in this transformation would look for a widget in this category.
Ideas from the discussion:
Includes