Add analysis using RAPIDS.

ml_pipeline
junos 2022-08-23 16:41:41 +02:00
parent e33a49c9fc
commit a8fd96d2f1
3 changed files with 1100 additions and 63 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.11.2
# jupytext_version: 1.13.0
# kernelspec:
# display_name: straw2analysis
# language: python
@ -17,6 +17,7 @@
# %%
import os
import sys
import datetime
import seaborn as sns
@ -26,6 +27,7 @@ if nb_dir not in sys.path:
import participants.query_db
from features.esm import *
from features.esm_JCQ import *
from features.esm_SAM import *
# %%
participants_inactive_usernames = participants.query_db.get_usernames(
@ -99,6 +101,12 @@ df_esm_PANAS_summary_participant[df_esm_PANAS_summary_participant["std"] < 0.1]
# %% [markdown]
# # Stress appraisal measure
# %%
df_SAM_all = extract_stressful_events(df_esm_inactive)
# %%
df_SAM_all.head()
# %%
df_esm_SAM = df_esm_preprocessed[
(df_esm_preprocessed["questionnaire_id"] >= 87)

View File

@ -6,7 +6,7 @@
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.12.0
# jupytext_version: 1.13.0
# kernelspec:
# display_name: straw2analysis
# language: python
@ -14,25 +14,7 @@
# ---
# %%
# %matplotlib inline
import datetime
import os
import sys
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import statsmodels.api as sm
import statsmodels.formula.api as smf
nb_dir = os.path.split(os.getcwd())[0]
if nb_dir not in sys.path:
sys.path.append(nb_dir)
import participants.query_db
from features.esm import *
# %%
SAVE_FIGS = True
SAVE_FIGS = False
FIG_HEIGHT = 5
FIG_ASPECT = 1.7
FIG_COLOUR = "#28827C"