armacmp icon indicating copy to clipboard operation
armacmp copied to clipboard

Support evaluate_with_gradient

Open dirkschumacher opened this issue 4 years ago • 0 comments

Something like this

arma_optim(
  data = list(design_matrix = type_matrix(), response = type_colvec()),
  evaluate_with_gradient = function(beta, g) {
    diff <- response - design_matrix %*% beta
    g <- -2 %*% t(design_matrix) %*% diff
    return(norm(diff)^2)
  }
  optimizer = optimizer_L_BFGS()
)

dirkschumacher avatar Aug 05 '19 19:08 dirkschumacher