📅  最后修改于: 2022-03-11 14:51:58.611000             🧑  作者: Mango
# 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
)