SL validation complete
This commit is contained in:
@@ -74,6 +74,13 @@ def _(Path, RESULTS_FILE, data_all, mo):
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
def _():
|
||||
sl_ss_max_score = 5
|
||||
sl_v1_10_max_score = 10
|
||||
return sl_ss_max_score, sl_v1_10_max_score
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(
|
||||
S,
|
||||
@@ -82,12 +89,20 @@ def _(
|
||||
data_all,
|
||||
duration_validation,
|
||||
mo,
|
||||
sl_ss_max_score,
|
||||
sl_v1_10_max_score,
|
||||
):
|
||||
_ss_all = S.get_ss_green_blue(data_all)[0].join(S.get_ss_orange_red(data_all)[0], on='_recordId')
|
||||
sl_content = check_straight_liners(_ss_all, max_score=5)
|
||||
_sl_ss_c, sl_ss_df = check_straight_liners(_ss_all, max_score=sl_ss_max_score)
|
||||
|
||||
_sl_v1_10_c, sl_v1_10_df = check_straight_liners(
|
||||
S.get_voice_scale_1_10(data_all)[0],
|
||||
max_score=sl_v1_10_max_score
|
||||
)
|
||||
|
||||
|
||||
mo.md(f"""
|
||||
## Data Validation
|
||||
# Data Validation
|
||||
|
||||
{check_progress(data_all)}
|
||||
|
||||
@@ -96,12 +111,30 @@ def _(
|
||||
{duration_validation(data_all)}
|
||||
|
||||
|
||||
{sl_content}
|
||||
## Speaking Style - Straight Liners
|
||||
{_sl_ss_c}
|
||||
|
||||
|
||||
## Voice Score Scale 1-10 - Straight Liners
|
||||
{_sl_v1_10_c}
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(data_all):
|
||||
# # Drop any Voice Scale 1-10 responses with straight-lining, using sl_v1_10_df _responseId values
|
||||
# records_to_drop = sl_v1_10_df.select('Record ID').to_series().to_list()
|
||||
|
||||
# data_validated = data_all.filter(~pl.col('_recordId').is_in(records_to_drop))
|
||||
|
||||
# mo.md(f"""
|
||||
# Dropped `{len(records_to_drop)}` responses with straight-lining in Voice Scale 1-10 evaluation.
|
||||
# """)
|
||||
data_validated = data_all
|
||||
return (data_validated,)
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(S, mo):
|
||||
filter_form = mo.md('''
|
||||
@@ -138,9 +171,9 @@ def _(S, mo):
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(S, data_all, filter_form, mo):
|
||||
def _(S, data_validated, filter_form, mo):
|
||||
mo.stop(filter_form.value is None, mo.md("**Please submit filter above to proceed**"))
|
||||
_d = S.filter_data(data_all, age=filter_form.value['age'], gender=filter_form.value['gender'], income=filter_form.value['income'], ethnicity=filter_form.value['ethnicity'], consumer=filter_form.value['consumer'])
|
||||
_d = S.filter_data(data_validated, age=filter_form.value['age'], gender=filter_form.value['gender'], income=filter_form.value['income'], ethnicity=filter_form.value['ethnicity'], consumer=filter_form.value['consumer'])
|
||||
|
||||
# Stop execution and prevent other cells from running if no data is selected
|
||||
mo.stop(len(_d.collect()) == 0, mo.md("**No Data available for current filter combination**"))
|
||||
@@ -363,8 +396,16 @@ def _(S, mo, vscales):
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _():
|
||||
@app.cell
|
||||
def _(vscales):
|
||||
target_cols=[c for c in vscales.columns if c not in ['_recordId']]
|
||||
target_cols
|
||||
return (target_cols,)
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(target_cols, utils, vscales):
|
||||
vscales_row_norm = utils.normalize_row_values(vscales.collect(), target_cols=target_cols)
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user