Skip to content

Extracting weights from 100 iterations and from random random forset model #316

Discussion options

You must be logged in to vote

Extracting coefficients from multiple iterations of logistic regression

Here's a full reprex using the built-in otu_mini_bin dataset and only 3 random seeds (so it runs quickly).

library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
library(future)
library(furrr)
library(mikropml)
plan("multisession", workers = 4)

test_hp <- list(alpha = 0, lambda = c(0.05, 0.1, 1, 2, 3))
get_results <- function(seed) {
    run_ml(
        otu_mini_bin,
        method = "glmnet",
        outcome_colname = "dx",
        seed = seed

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Hesham999666
Comment options

Answer selected by kelly-sovacool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants