Skip to content

Commit

Permalink
for clarity and consistency with python script
Browse files Browse the repository at this point in the history
  • Loading branch information
gertstulp authored Mar 27, 2024
1 parent 1dec942 commit 9c823ce
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 9c823ce

Please sign in to comment.