📜  r optim - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:51:58.611000             🧑  作者: Mango

代码示例1
# Optimize the metric
optim(
  # Initially guess 0 intercept and 0 slope
  par = c(intercept = 0, slope = 0), 
  # Use calc_sum_of_squares as the optimization function
  fn = calc_sum_of_squares
)