Skip to content

Commit

Permalink
Merge pull request #33 from gertstulp/patch-11
Browse files Browse the repository at this point in the history
for clarity and consistency with python script
  • Loading branch information
vloothuis authored Mar 28, 2024
2 parents 727121c + 9c823ce commit 40d3285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions training.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# It is important to document your training steps here, including seed,
# number of folds, model, et cetera

train_save_model <- function(clean_df, outcome_df) {
train_save_model <- function(cleaned_df, outcome_df) {
# Trains a model using the cleaned dataframe and saves the model to a file.

# Parameters:
Expand All @@ -17,7 +17,7 @@ train_save_model <- function(clean_df, outcome_df) {
set.seed(1) # not useful here because logistic regression deterministic

# Combine cleaned_df and outcome_df
model_df <- merge(clean_df, outcome_df, by = "nomem_encr")
model_df <- merge(cleaned_df, outcome_df, by = "nomem_encr")

# Logistic regression model
model <- glm(new_child ~ age, family = "binomial", data = model_df)
Expand Down

0 comments on commit 40d3285

Please sign in to comment.