Add a demo of pipeline.

rapids
junos 2021-11-17 10:44:49 +01:00
parent d34c2ec5e9
commit e33a49c9fc
3 changed files with 496 additions and 10 deletions

View File

@ -99,9 +99,7 @@ df_esm_PANAS_daily_means = (
# %%
df_proximity_daily_counts = proximity.count_proximity(
df_proximity, ["date_lj"]
)
df_proximity_daily_counts = proximity.count_proximity(df_proximity, ["date_lj"])
# %%
df_proximity_daily_counts

File diff suppressed because one or more lines are too long

View File

@ -96,10 +96,20 @@ df_session_counts_time = classify_sessions_by_completion_time(df_esm_preprocesse
# Sessions are now classified according to the type of a session (a true questionnaire or simple single questions) and users response.
# %%
df_session_counts_time["session_response_cat"] = df_session_counts_time["session_response"].astype("category")
df_session_counts_time["session_response_cat"] = df_session_counts_time["session_response_cat"].cat.remove_categories(['during_work_first', 'ema_unanswered', 'evening_first', 'morning', 'morning_first'])
df_session_counts_time["session_response_cat"] = df_session_counts_time["session_response_cat"].cat.add_categories("interrupted")
df_session_counts_time.loc[df_session_counts_time["session_response_cat"].isna(), "session_response_cat"] = "interrupted"
df_session_counts_time["session_response_cat"] = df_session_counts_time[
"session_response"
].astype("category")
df_session_counts_time["session_response_cat"] = df_session_counts_time[
"session_response_cat"
].cat.remove_categories(
["during_work_first", "ema_unanswered", "evening_first", "morning", "morning_first"]
)
df_session_counts_time["session_response_cat"] = df_session_counts_time[
"session_response_cat"
].cat.add_categories("interrupted")
df_session_counts_time.loc[
df_session_counts_time["session_response_cat"].isna(), "session_response_cat"
] = "interrupted"
# df_session_counts_time["session_response_cat"] = df_session_counts_time["session_response_cat"].cat.rename_categories({
# "ema_unanswered": "interrupted",
# "morning_first": "interrupted",