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

后端 未结 3 1589
深忆病人
深忆病人 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 21:09

    The error - "TypeError: 'A' must be a 'd' matrix with 1000 columns:" has two condition namely:

    1. if the type code is not equal to 'd'
    2. if the A.size[1] != c.size[0].

    Check for these conditions.

提交回复
热议问题