dianna
dianna copied to clipboard
text visualizations seems to have colormap reversed
Should be fixed in the LIME text tutorial and RISE text tutorial indeed!
Colormap - 'bwr'.
Red should indicate a positive contribution towards the decision and blue- a negative contribution.
The default colormap is chosen as RdBu
, see here. It should be changed to bwr
and notebooks should be updated. I can fix it.
[like] Elena Ranguelova reacted to your message:
From: SarahAlidoost @.> Sent: Thursday, May 23, 2024 12:16:06 PM To: dianna-ai/dianna @.> Cc: Elena Ranguelova @.>; Comment @.> Subject: Re: [dianna-ai/dianna] text visualizations seems to have colormap reversed (Issue #755)
The default colormap is chosen as RdBu, see herehttps://github.com/dianna-ai/dianna/blob/b3518eced5be0a02d196dc5b477a0791281b0a90/dianna/visualization/text.py#L9. It should be changed to bwr and notebooks should be updated. I can fix it.
— Reply to this email directly, view it on GitHubhttps://github.com/dianna-ai/dianna/issues/755#issuecomment-2126962015, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYYBWO5KVVFOK4XOWRN42LZDXMYNAVCNFSM6AAAAABGYVI4CSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRWHE3DEMBRGU. You are receiving this because you commented.Message ID: @.***>
Also, we are now not using HTML visualization anymore, right? Then we should edit the 4. Visualization section of the notebook to remove that claim.
@SarahAlidoost it's easy for me to fix it within my PR #769 as I just did the same for the overview notebook.
Fixed the colormap issue (though notebooks can be simplified now, by not using the colormap explicitly) with a few commits: https://github.com/dianna-ai/dianna/pull/769/commits/e0d1ee84627fa442e57e4e92d356f76091474f0b; https://github.com/dianna-ai/dianna/pull/769/commits/6e843b16d736a0f69f8cf80da99275624f21609d in https://github.com/dianna-ai/dianna/pull/769/ , but found out dianna breaks if the sentence ends with a dot :-(
Fixed the colormap issue (though notebooks can be simplified now, by not using the colormap explicitly) with a few commits: e0d1ee8; 6e843b1 in #769 , but found out dianna breaks if the sentence ends with a dot :-(
Thanks. Let's submit the "dot" problem in another issue. Currently, the visualization wraps the text if there are dots, see here. However, it has not been tested, see here. Can you please submit the "dot" problem in a separate issue? I can try to fix it.
[like] Elena Ranguelova reacted to your message:
From: SarahAlidoost @.> Sent: Monday, May 27, 2024 11:21:34 AM To: dianna-ai/dianna @.> Cc: Elena Ranguelova @.>; Assign @.> Subject: Re: [dianna-ai/dianna] text visualizations seems to have colormap reversed (Issue #755)
Fixed the colormap issue (though notebooks can be simplified now, by not using the colormap explicitly) with a few commits: e0d1ee8https://github.com/dianna-ai/dianna/commit/e0d1ee84627fa442e57e4e92d356f76091474f0b; 6e843b1https://github.com/dianna-ai/dianna/commit/6e843b16d736a0f69f8cf80da99275624f21609d in #769https://github.com/dianna-ai/dianna/pull/769 , but found out dianna breaks if the sentence ends with a dot :-(
Thanks. Let's submit the "dot" problem in another issue. Currently, the visualization wraps the text if there are dots, see herehttps://github.com/dianna-ai/dianna/blob/b3518eced5be0a02d196dc5b477a0791281b0a90/dianna/visualization/text.py#L65. However, it has not been tested, see herehttps://github.com/dianna-ai/dianna/blob/b3518eced5be0a02d196dc5b477a0791281b0a90/tests/test_visualization.py#L84. Can you please submit the "dot" problem in a separate issue? I can try to fix it.
— Reply to this email directly, view it on GitHubhttps://github.com/dianna-ai/dianna/issues/755#issuecomment-2133263938, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYYBWIDVGBEN3WFRVEWUGTZEMJL5AVCNFSM6AAAAABGYVI4CSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGI3DGOJTHA. You are receiving this because you were assigned.Message ID: @.***>
Fixed by commits https://github.com/dianna-ai/dianna/pull/776/commits/643b478ff8a5466982c3ff9826fb3e1ecff2d0df, https://github.com/dianna-ai/dianna/pull/776/commits/c461e7ca316008bda958ee13fa7f26ffd978d799 and https://github.com/dianna-ai/dianna/pull/776/commits/1302a4f1c651bd121f74304b5f4738ae3c41fec1.
@loostrum, @SarahAlidoost , @cwmeijer it's very strange that RISE gives always only positive scores even for very negative reviews! See RISE for text tutorial.. Any ideas?