Skip to content

Instantly share code, notes, and snippets.

@masayukeeeee
Created June 12, 2017 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masayukeeeee/a01cb6960fdbfbc4b3d29431ce75422c to your computer and use it in GitHub Desktop.
Save masayukeeeee/a01cb6960fdbfbc4b3d29431ce75422c to your computer and use it in GitHub Desktop.
Sample Nelder and Mead 1965 1 for R
# objective function
obj_func <- function(x){ 100*(x[2]-x[1]^2)^2 + (1 - x[1])^2 }
# initial value
x1 <- c(-1.2, 1)
# nelder and mead method
Nelder_mead(x1, obj_func=obj_func)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment