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
for result, corrected_result in zip(results, corrected_results): | |
print(f"{result.pvalue:.2e} => {corrected_result.pvalue:.2e}") |
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
hue_plot_params = {**hue_plot_params, | |
'x': 'Goal','y': 'State', | |
'dodge': True, 'orient': 'h'} | |
with sns.plotting_context("notebook", font_scale=1.4): | |
# Create new plot | |
ax = get_log_ax('h') | |
# Plot with seaborn | |
ax = sns.barplot(ax=ax, **hue_plot_params) |
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
with sns.plotting_context("notebook", font_scale = 1.4): | |
# Create new plot | |
ax = get_log_ax() | |
# Plot with seaborn | |
ax = sns.boxplot(ax=ax, **hue_plot_params) | |
# Add annotations | |
annotator = Annotator(ax, pairs, **hue_plot_params) | |
annotator.configure(test="Mann-Whitney", comparisons_correction="bonferroni") |
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
pairs =( | |
[('Successful', 'Robots'), ('Successful', 'Flight')], | |
[('Successful', 'Flight'), ('Successful', 'Sound')], | |
[('Successful', 'Robots'), ('Successful', 'Sound')], | |
[('Failed', 'Robots'), ('Failed', 'Flight')], | |
[('Failed', 'Flight'), ('Failed', 'Sound')], | |
[('Failed', 'Robots'), ('Failed', 'Sound')], | |
[('Live', 'Robots'), ('Live', 'Flight')], |
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
# Switching hue and x | |
hue_plot_params = { | |
'data': rfs, | |
'x': 'State', | |
'y': 'Goal', | |
"order": states_order, | |
"hue": "Subcategory", | |
"hue_order": subcat_order, | |
"palette": subcat_palette | |
} |
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
hue_plot_params = { | |
'data': rfs, | |
'x': 'Subcategory', | |
'y': 'Goal', | |
"order": subcat_order, | |
"hue": "State", | |
"hue_order": states_order, | |
"palette": state_palette | |
} |
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
pairs = [ | |
[('Robots', 'Successful'), ('Robots', 'Failed')], | |
[('Flight', 'Successful'), ('Flight', 'Failed')], | |
[('Sound', 'Successful'), ('Sound', 'Failed')], | |
[('Robots', 'Successful'), ('Robots', 'Live')], | |
[('Flight', 'Successful'), ('Flight', 'Live')], | |
[('Sound', 'Successful'), ('Sound', 'Live')], | |
[('Robots', 'Failed'), ('Robots', 'Live')], |
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
with sns.plotting_context('notebook', font_scale = 1.4): | |
# Create new plot | |
ax = get_log_ax() | |
# Plot with seaborn | |
ax = sns.boxplot(ax=ax, | |
data=rfs, | |
x='Subcategory', y='Goal', | |
order=subcat_order, | |
hue="State", |
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
pairs = [ | |
("Successful", "Failed"), | |
("Successful", "Live"), | |
("Failed", "Live"), | |
("Canceled", "Successful"), | |
("Canceled", "Failed"), | |
("Canceled", "Live") | |
] | |
state_plot_params = { |
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
# Add annotations | |
annotator.new_plot(ax, **plotting_parameters) | |
annotator.configure(text_format="full", verbose=False).apply_and_annotate() |
NewerOlder