generic voice plots

This commit is contained in:
2026-02-03 00:15:10 +01:00
parent a7ee854ed0
commit 426495ebe3

View File

@@ -583,12 +583,6 @@ def _():
return return
@app.cell
def _(top3_voices_weighted):
print(top3_voices_weighted.head())
return
@app.cell @app.cell
def _(S, top3_voices): def _(S, top3_voices):
S.plot_most_ranked_1(top3_voices, title="Most Popular Voice<br>(Number of Times Ranked 1st)", x_label='Voice') S.plot_most_ranked_1(top3_voices, title="Most Popular Voice<br>(Number of Times Ranked 1st)", x_label='Voice')
@@ -607,112 +601,10 @@ def _():
def _(S, data): def _(S, data):
# Get your voice scale data (from notebook) # Get your voice scale data (from notebook)
voice_1_10, _ = S.get_voice_scale_1_10(data) voice_1_10, _ = S.get_voice_scale_1_10(data)
S.plot_average_scores_with_counts(voice_1_10, x_label='Voice', domain=[1,10], title="Voice General Impression (Scale 1-10)")
return (voice_1_10,) return (voice_1_10,)
@app.cell(disabled=True)
def _(S, voice_1_10):
S.plot_average_scores_with_counts(voice_1_10, x_label='Voice', domain=[1,10], title="Voice General Impression (Scale 1-10)")
return
@app.cell(disabled=True)
def _():
mo.md(r"""
### Statistical Significance (Scale 1-10)
""")
return
@app.cell
def _(S, voice_1_10):
# Compute pairwise significance tests
pairwise_df, metadata = S.compute_pairwise_significance(
voice_1_10,
test_type="mannwhitney", # or "ttest", "chi2", "auto"
alpha=0.05,
correction="bonferroni" # or "holm", "none"
)
# View significant pairs
# print(pairwise_df.filter(pl.col('significant') == True))
# Create heatmap visualization
_heatmap = S.plot_significance_heatmap(
pairwise_df,
metadata=metadata,
title="Voice Rating Significance<br>(Pairwise Comparisons)"
)
# Create summary bar chart
_summary = S.plot_significance_summary(
pairwise_df,
metadata=metadata
)
mo.md(f"""
{mo.ui.altair_chart(_heatmap)}
{mo.ui.altair_chart(_summary)}
""")
return
@app.cell
def _():
mo.md(r"""
### Statistical Significance (Scale 1-10)
""")
return
@app.cell
def _(S, voice_1_10):
# Compute pairwise significance tests
pairwise_df, metadata = S.compute_pairwise_significance(
voice_1_10,
test_type="mannwhitney", # or "ttest", "chi2", "auto"
alpha=0.05,
correction="bonferroni" # or "holm", "none"
)
# View significant pairs
# print(pairwise_df.filter(pl.col('significant') == True))
# Create heatmap visualization
_heatmap = S.plot_significance_heatmap(
pairwise_df,
metadata=metadata,
title="Voice Rating Significance<br>(Pairwise Comparisons)"
)
# Create summary bar chart
_summary = S.plot_significance_summary(
pairwise_df,
metadata=metadata
)
mo.md(f"""
{mo.ui.altair_chart(_heatmap)}
{mo.ui.altair_chart(_summary)}
""")
return
@app.cell
def _(S, data):
# Get your voice scale data (from notebook)
voice_1_10, _ = S.get_voice_scale_1_10(data)
return (voice_1_10,)
@app.cell
def _(S, voice_1_10):
S.plot_average_scores_with_counts(voice_1_10, x_label='Voice', domain=[1,10], title="Voice General Impression (Scale 1-10)")
return
@app.cell(disabled=True) @app.cell(disabled=True)
def _(): def _():
mo.md(r""" mo.md(r"""
@@ -755,5 +647,10 @@ def _(S, voice_1_10):
return return
@app.cell
def _():
return
if __name__ == "__main__": if __name__ == "__main__":
app.run() app.run()