Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
19 changes: 12 additions & 7 deletions source/widgets/visualize/scoringsheetviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,25 @@ A widget for visualizing the scoring sheet predictions.

**Outputs**

- Features: features used in the scoring sheet
- Features: selected features used in the scoring sheet

![](images/ScoringSheetViewer-widget.png)
**Scoring Sheet Viewer** widget offers a simple and intuitive way of visualizing the predictions of the scoring sheet model. The widget takes as input a trained scoring sheet model and an optional dataset (instance) on which we want to visualize the predictions. The widget presents us with a table that visualizes each feature's contribution to the final score, where a higher score indicates a greater chance for an instance to be classified with the target class. Each feature's contribution can be positive or negative, indicating whether it increases or decreases the risk.

**Scoring Sheet Viewer** widget offers a simple and intuitive way of visualizing the predictions of the scoring sheet model. The widget takes as input a trained scoring sheet model and a optional dataset (instance) on which we want to visualize the predictions. The widget presents us with a table that visualizes each feature's contribution to the final score, where a higher score indicates a greater chance for an individual to be classified with the target class. Each feature's contribution can be positive or negative, indicating whether it increases or decreases the risk.
![](images/ScoringSheetViewer-stamped.png){width=400px}

1. *Target class*: set the target class for viewing.
2. Scoring sheet with attributed points and an indicating, whether the attributes are selected for the output.
3. Total scores and probabilities for a given instance.

The widget output selected features, which can be used downstream in [Scatter Plot](../visualize/scatterplot.md) or [Sieve Diagram](../visualize/sievediagram.md).

Example
-------

![](images/ScoringSheetViewer-workflow.png)
In this example, we first sample the *heart_disease* data, with 70% used to train the [Scoring Sheet](../model/scoringsheet.md) model and 30% routed to the [Data Table](../data/datatable.md) widget. This setup allows us to select instances and observe how the scoring sheet performs on new, unseen data.

In this example, we first sample the data, with a portion used to train the Scoring Sheet model and a part routed to the Table widget. This setup allows us to select instances and observe how the scoring sheet performs with new, unseen data.
![](images/ScoringSheetViewer-Example.png)

Let's analyze and learn to interpret the scoring sheet using the example. It features five decision parameters, with points ranging from -5 to 5. We have set the target class to '1,' indicating the 'presence' of heart disease. Positive-value decision parameters increase the risk of heart disease, while those with negative values reduce it.
Let's analyze and learn to interpret the scoring sheet using the example. It features five decision parameters, with points ranging from -5 to 5. We have set the target class to '1', indicating the 'presence' of heart disease. Positive-value decision parameters increase the risk of heart disease (i.e. reversable defect and asymptomatic chest pain), while those with negative values reduce it (i.e. ST by exercise higher than 1, no exercise induced angina, and few major vessels colored).

Consider a selected instance from the Data Table widget. It has a 'slope peak exc ST' attribute value of 'upsloping', which reduces the heart disease risk by 3 points. However, it also has the 'chest pain' attribute set to 'asymptomatic', increasing the risk by 5 points. This combination results in a total score of 2, corresponding to a 71.6% probability of having heart disease.
Consider a selected instance from the Data Table widget. It has a 'exerc ind ang' attribute value of '0', which reduces the heart disease risk by 3 points. However, it also has the 'chest pain' attribute set to 'asymptomatic', increasing the risk by 4 points. This combination results in a total score of 2, corresponding to a 79.6% probability of having heart disease.
78 changes: 78 additions & 0 deletions source/widgets/visualize/workflows/scoringsheetviewer.ows
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version='1.0' encoding='utf-8'?>
<scheme version="2.0" title="" description="">
<nodes>
<node id="0" name="File" qualified_name="Orange.widgets.data.owfile.OWFile" project_name="Orange3" version="" title="File" position="(86.0, 93.0)" />
<node id="1" name="Data Sampler" qualified_name="Orange.widgets.data.owdatasampler.OWDataSampler" project_name="Orange3" version="" title="Data Sampler" position="(213.0, 93.0)" />
<node id="2" name="Scoring Sheet" qualified_name="Orange.widgets.model.owscoringsheet.OWScoringSheet" project_name="Orange3" version="" title="Scoring Sheet" position="(376.0, 85.0)" />
<node id="3" name="Data Table" qualified_name="Orange.widgets.data.owtable.OWTable" project_name="Orange3" version="" title="Data Table" position="(376.0, 193.0)" />
<node id="4" name="Scoring Sheet Viewer" qualified_name="Orange.widgets.visualize.owscoringsheetviewer.OWScoringSheetViewer" project_name="Orange3" version="" title="Scoring Sheet Viewer" position="(545.0, 94.0)" />
</nodes>
<links>
<link id="0" source_node_id="0" sink_node_id="1" source_channel="Data" sink_channel="Data" enabled="true" source_channel_id="data" sink_channel_id="data" />
<link id="1" source_node_id="1" sink_node_id="2" source_channel="Data Sample" sink_channel="Data" enabled="true" source_channel_id="data_sample" sink_channel_id="data" />
<link id="2" source_node_id="1" sink_node_id="3" source_channel="Remaining Data" sink_channel="Data" enabled="true" source_channel_id="remaining_data" sink_channel_id="data" />
<link id="3" source_node_id="2" sink_node_id="4" source_channel="Model" sink_channel="Classifier" enabled="true" source_channel_id="model" sink_channel_id="classifier" />
<link id="4" source_node_id="3" sink_node_id="4" source_channel="Selected Data" sink_channel="Data" enabled="true" source_channel_id="selected_data" sink_channel_id="data" />
</links>
<annotations />
<thumbnail />
<node_properties>
<properties node_id="0" format="pickle">gASVqQoAAAAAAAB9lCiMEmNvbnRyb2xBcmVhVmlzaWJsZZSIjAxyZWNlbnRfcGF0aHOUXZQojB5v
cmFuZ2V3aWRnZXQudXRpbHMuZmlsZWRpYWxvZ3OUjApSZWNlbnRQYXRolJOUKYGUfZQojAdhYnNw
YXRolIw8L1VzZXJzL2FqZGEvb3JhbmdlL29yYW5nZTMvT3JhbmdlL2RhdGFzZXRzL2hlYXJ0X2Rp
c2Vhc2UudGFilIwGcHJlZml4lIwPc2FtcGxlLWRhdGFzZXRzlIwHcmVscGF0aJSMEWhlYXJ0X2Rp
c2Vhc2UudGFilIwFdGl0bGWUjACUjAVzaGVldJRoEIwLZmlsZV9mb3JtYXSUTnViaAYpgZR9lCho
CYw2L1VzZXJzL2FqZGEvb3JhbmdlL29yYW5nZTMvT3JhbmdlL2RhdGFzZXRzL2hvdXNpbmcudGFi
lGgLaAxoDYwLaG91c2luZy50YWKUaA9oEGgRaB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
YmV1Lg==
</properties>
<properties node_id="1" format="literal">{'compatibility_mode': False, 'controlAreaVisible': True, 'number_of_folds': 10, 'replacement': False, 'sampleSizeNumber': 1, 'sampleSizePercentage': 70, 'sampleSizeSqlPercentage': 0.1, 'sampleSizeSqlTime': 1, 'sampling_type': 0, 'savedWidgetGeometry': None, 'selectedFold': 1, 'sql_dl': False, 'stratify': False, 'use_seed': True, '__version__': 2}</properties>
<properties node_id="2" format="literal">{'auto_apply': True, 'controlAreaVisible': True, 'custom_features_checkbox': False, 'learner_name': '', 'max_points_per_param': 5, 'num_attr_after_selection': 20, 'num_decision_params': 5, 'num_input_features': 1, 'savedWidgetGeometry': b'\x01\xd9\xd0\xcb\x00\x03\x00\x00\x00\x00\x02:\x00\x00\x01/\x00\x00\x03\x9a\x00\x00\x02\x99\x00\x00\x02:\x00\x00\x01K\x00\x00\x03\x9a\x00\x00\x02\x99\x00\x00\x00\x00\x02\x00\x00\x00\x05\xe8\x00\x00\x02:\x00\x00\x01K\x00\x00\x03\x9a\x00\x00\x02\x99', '__version__': 1}</properties>
<properties node_id="3" format="literal">{'auto_commit': True, 'color_by_class': True, 'controlAreaVisible': False, 'savedWidgetGeometry': b'\x01\xd9\xd0\xcb\x00\x03\x00\x00\x00\x00\x00&amp;\x00\x00\x01d\x00\x00\x02u\x00\x00\x02A\x00\x00\x00&amp;\x00\x00\x01\x80\x00\x00\x02u\x00\x00\x02A\x00\x00\x00\x00\x00\x00\x00\x00\x05\xe8\x00\x00\x00&amp;\x00\x00\x01\x80\x00\x00\x02u\x00\x00\x02A', 'select_rows': True, 'show_attribute_labels': True, 'show_distributions': False, 'stored_selection': {'rows': [0], 'columns': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]}, 'stored_sort': [], '__version__': 1}</properties>
<properties node_id="4" format="literal">{'controlAreaVisible': True, 'savedWidgetGeometry': b'\x01\xd9\xd0\xcb\x00\x03\x00\x00\x00\x00\x02\x87\x00\x00\x01\x06\x00\x00\x04g\x00\x00\x02\x9d\x00\x00\x02\x87\x00\x00\x01"\x00\x00\x04g\x00\x00\x02\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x05\xe8\x00\x00\x02\x87\x00\x00\x01"\x00\x00\x04g\x00\x00\x02\x9d', '__version__': 1}</properties>
</node_properties>
<session_state>
<window_groups />
</session_state>
</scheme>