I am trying to use CVXPY to analyse a problem and the objective function for this problem involves calculating a product and a sum as per the problem description below (taken from a draft paper I am writing):
However, I cannot figure out how to specify such an objective function in CVXPY given that it uses a product to combine all of the probability values for a particular target. In order to replicate the objective function, I need to multiply all of the elements of each row in a matrix together (i.e. multiplication along an axis). I am hoping to achieve something like the function shown below, which doesn't work because of the use of the numpy function.
objective = cp.Maximize(cp.sum(np.prod(1-cp.exp(cp.multiply(x, cp.log(q))), axis=1)))
Is there any way that I can perform multiplication along an axis in CVXPY? Or, is there an alternative way to represent my objective function?