[WIP] Start merging steps into a class for a pipeline.

communication
junos 2021-08-12 17:38:08 +02:00
parent 577a874288
commit 622477f19f
2 changed files with 26 additions and 0 deletions

View File

@ -148,3 +148,17 @@ lin_reg_proximity.score(
df_full_data_daily_means[["freq_prox_near", "prop_prox_near"]], df_full_data_daily_means[["freq_prox_near", "prop_prox_near"]],
df_full_data_daily_means["PA"], df_full_data_daily_means["PA"],
) )
# %% [markdown]
# # Merging these into a pipeline
# %%
from machine_learning import pipeline
# %%
ml_pipeline = pipeline.MachineLearningPipeline()
# %%
ml_pipeline.participants_usernames
# %%

View File

@ -0,0 +1,12 @@
import datetime
import participants.query_db
class MachineLearningPipeline:
def __init__(self, participants_usernames=None):
if participants_usernames is None:
participants_usernames = participants.query_db.get_usernames(
collection_start=datetime.date.fromisoformat("2020-08-01")
)
self.participants_usernames = participants_usernames