3

問題に対して solve.QP を実行すると、R から次のエラーが表示されます。

Error in solve.QP(sigma, rep(0, 5), t(Amat), bvec, meq = 2) : 
  matrix D in quadratic function is not positive definite!

私のシグマ行列は対称ですが、正定値ではありません。なぜこれが必要なのですか?ラグランジュ関数を使って自分で解けば、解を得ることができます。では、なぜ R はこの要件を課しているのですか?

4

2 に答える 2

4

Goldfarb-Idnaniアルゴリズムは、制約のない解を計算することから始まります。したがって、目的関数の行列Dが正定値である必要があります。

Fortranソースファイルsolve.QP.fからの抜粋:

c  this routine uses the Goldfarb/Idnani algorithm to solve the
c  following minimization problem:
c
c        minimize  -d^T x + 1/2 *  x^T D x
c        where   A1^T x  = b1
c                A2^T x >= b2
c
c  the matrix D is assumed to be positive definite.  Especially,
c  w.l.o.g. D is assumed to be symmetric.
于 2010-08-16T20:39:05.630 に答える
1

auglagパッケージ内の関数alabamaは、最適化問題のソリューションでラグランジュ乗数を提供します。

于 2012-10-29T22:47:43.000 に答える