0

Generally I have trained a logistic regression model with:

glm_model <- glm(response ~ x, data = original_data, family  = "binomial")
data_new  <- tibble(response = original_data$response,
                    score_glm = glm_model$linear.predictors)

After that I will again make a non-linear optimization with the minpack.lm package from R in order to get better results.

a_coef = 0
b_coef = 1
c_coef = 4
d_coef = 7

minpack.lm::nlsLM(response ~ a + b/(1 + exp(-(c + d * score_glm))),
                         data =  data_new, 
                         start = c(a = a_coef,
                                   b = b_coef,
                                   c = c_coef,
                                   d = d_coef),
                         control = list(maxiter = 1000))

Could this be a valid procedure in order to get better results?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Christian
  • 113
  • 2

0 Answers0