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(
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.
via using
A = matrix(A, (1, m), 'd')
could actually solve this problem!
Your matrix elements have to be of the floating-point type as well. So the error is removed by using A = A.astype('float')
to cast it.
The error - "TypeError: 'A' must be a 'd' matrix with 1000 columns:"
has two condition namely:
d
' A.size[1] != c.size[0]
. Check for these conditions.