DEV Community

Siladittya Manna
Siladittya Manna

Posted on

Getting DCPError when trying to solve Dual form of SVM using CVXPY

I am trying to create a SVM using cvxpy, by solving its Dual form

enter image description here

Here is the code:

import cvxpy as cp
import numpy as np

DIM = 2
NUM = 50
#COLORS = ['red', 'blue']
M1 = np.ones((DIM,))
M2 = 2 * np.ones((DIM,))
C1 = np.diag(0.3 * np.ones((DIM,)))
C2

Top comments (0)