How to use the Eigen unsupported levenberg marquardt implementation?

后端 未结 4 478
说谎
说谎 2020-12-24 04:29

I\'m trying to minimize a following sample function:

F(x) = f[0]^2(x[0],...,x[n-1]) + ... + f[m-1]^2(x[0],...,x[n-1])

A normal way to minim

4条回答
  •  北海茫月
    2020-12-24 05:05

    As an alternative you may simply create a new functor like this,

    struct my_functor_w_df : Eigen::NumericalDiff {};
    

    and then initialize the LevenbergMarquardt instance using like this,

    my_functor_w_df functor;
    Eigen::LevenbergMarquardt lm(functor);
    

    Personally, I find this approach a bit cleaner.

提交回复
热议问题