I want to make a term in an objective function I am working with fit into DCP for CVXPY.
I am working on replicating this research paper for an active learning problem. Specifically equations 5 is what I am trying to implement in CVXPY.
A bit of an explanation. I have a set of $n$ vectors $x_i$, each representing one piece of unlabeled data, that I want to get labeled into one of $C$ classes. But the difficulty is that I know that for a few of the classes that they are infrequent, so instead of taking random samples to be labeled, we want to make smart selections as to what should get labeled.
If I have a matrix $P_{ij}$, where for each row $i$ for each unlabeled data point, I have a confidence score in each column $j$ for each class. A high confidence score means that we are more certain that that data point belongs to that class, a lower one means we are less confident.
I also have a redundancy matrix $R_{ij}$, which calculated by $R_{ij}=\max(0,\cos(x_i,x_j))$. This is used to identify pairs of data points that are likely very similar, and not select them to both be labeled.
What the optimization problem is trying to solve for is a matrix $M_{ij}$ , where each row $i$ represents a data point, and each columns $j$ represents a class. For each for we either want to assign a 1 to one of the columns and all the other values remain 0 to designate a data poi t to label, or all the values remain zero to designate select no data points.
I have followed equation 5 because it looks fairly straight forward to calculate, but the difficulty I am encountering it that CVXPY does not like the $(Me)^TR(Me)$(e is a vector of ones with as many elements as there are classes) term due to it not fitting in to the rules of DCP, but the authors of the paper proved that its a linear program. When I write it in terms of the equivalent 7 in equation I run into the same issue.
What resources or hints are there for translating the redundancy term in the objective function in equation 5 and 7 in the paper into something that CVXPY will accept as compliant with DCP? I am not very familiar with how to classify the exact type of optimization that this might be, so please excuse me if I missed something that would have answered my own question.