CVXOPT QP Solver: TypeError: 'A' must be a 'd' matrix with 1000 columns

后端 未结 3 1671
深忆病人
深忆病人 2021-01-17 20:20

I\'m trying to use the CVXOPT qp solver to compute the Lagrange Multipliers for a Support Vector Machine

def svm(X, Y, c):
      m = len(X)
      P = matrix(         


        
3条回答
  •  日久生厌
    2021-01-17 20:50

    i have try A=A.astype(double) to solve it, but it is invalid, since python doesn't know what double is or A has no method astype.

    therefore

    via using A = matrix(A, (1, m), 'd') could actually solve this problem!

提交回复
热议问题