Skip to content

Remove converstion to factors from run_lasso.R? #20

@retowuest

Description

@retowuest

I believe the below lines can be removed from run_lasso.R since it is now done in file auto_mrp.R.

Convert individual-level, geographic unit, and geographic region

    # covariates to factor variables in training and validation sets
    data_train <- data_train %>%
      dplyr::mutate_at(.vars = c(L1.x, L2.unit, L2.reg), as.factor) %>%
      dplyr::select(dplyr::all_of(c(y, L1.x, L2.x, L2.unit, L2.reg))) %>%
      tidyr::drop_na()

    data_valid <- data_valid %>%
      dplyr::mutate_at(.vars = c(L1.x, L2.unit, L2.reg), as.factor) %>%
      dplyr::select(dplyr::all_of(c(y, L1.x, L2.x, L2.unit, L2.reg))) %>%
      tidyr::drop_na()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions