voice plots

This commit is contained in:
2026-02-03 00:12:18 +01:00
parent 97c4b07208
commit a7ee854ed0
3 changed files with 113 additions and 24 deletions

View File

@@ -255,7 +255,7 @@ def _():
mo.md(r"""
---
# Brand Character Results (overall)
# Brand Character Results
""")
return
@@ -276,7 +276,7 @@ def _(S, data):
return
@app.cell
@app.cell(disabled=True)
def _():
mo.md(r"""
## Character ranking points
@@ -311,7 +311,7 @@ def _(S, char_rank):
return
@app.cell(disabled=True)
@app.cell
def _():
mo.md(r"""
### Statistical Significance Character Ranking
@@ -335,7 +335,7 @@ def _(S, char_rank):
return
@app.cell
@app.cell(disabled=True)
def _():
mo.md(r"""
## Character Ranking: times 1st place
@@ -438,7 +438,7 @@ def _():
return
@app.cell
@app.cell(disabled=True)
def _():
return
@@ -461,20 +461,34 @@ def _():
@app.cell
def _():
mo.md(r"""
## 8 Most Chosen
## Top 8 Most Chosen out of 18
""")
return
@app.cell
def _(S, data):
v_18_8_3 = S.get_18_8_3(data)[0].collect()
v_18_8_3 = S.get_18_8_3(data)[0]
return (v_18_8_3,)
@app.cell
def _(S, v_18_8_3):
S.plot_voice_selection_counts(v_18_8_3)
S.plot_voice_selection_counts(v_18_8_3, title="Top 8 Voice Selection from 18 Voices", x_label='Voice')
return
@app.cell
def _():
mo.md(r"""
## Top 3 most chosen out of 8
""")
return
@app.cell
def _(S, v_18_8_3):
S.plot_top3_selection_counts(v_18_8_3, title="Top 3 Voice Selection Counts from 8 Voices", x_label='Voice')
return
@@ -497,10 +511,7 @@ def _(S, data):
@app.cell
def _(S, top3_voices):
_plot = S.plot_ranking_distribution(top3_voices, x_label='Voice')
mo.md(f"""
{mo.ui.altair_chart(_plot)}
""")
S.plot_ranking_distribution(top3_voices, x_label='Voice', title="Distribution of Voice Rankings (1st, 2nd, 3rd)")
return
@@ -548,7 +559,7 @@ def _():
return
@app.cell
@app.cell(hide_code=True)
def _():
mo.md(r"""
## Weighted Popularity Scores
@@ -568,6 +579,7 @@ def _(S, top3_voices_weighted):
@app.cell
def _():
## Voice Ranked 1st the most
return
@@ -578,7 +590,8 @@ def _(top3_voices_weighted):
@app.cell
def _():
def _(S, top3_voices):
S.plot_most_ranked_1(top3_voices, title="Most Popular Voice<br>(Number of Times Ranked 1st)", x_label='Voice')
return
@@ -597,13 +610,13 @@ def _(S, data):
return (voice_1_10,)
@app.cell(hide_code=True)
@app.cell(disabled=True)
def _(S, voice_1_10):
S.plot_average_scores_with_counts(voice_1_10, x_label='Voice', width=1000, domain=[1,10], title="Voice General Impression (Scale 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
@app.cell(disabled=True)
def _():
mo.md(r"""
### Statistical Significance (Scale 1-10)
@@ -687,5 +700,60 @@ def _(S, voice_1_10):
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)
def _():
mo.md(r"""
### Statistical Significance (Scale 1-10)
""")
return
@app.cell(disabled=True)
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
if __name__ == "__main__":
app.run()