Nothing
#####
## DO NOT EDIT THIS FILE!! EDIT THE SOURCE INSTEAD: rsrc_tree/reductions/dgp2dcp/canonicalizers/eye_minus_inv_canon.R
#####
## CVXPY SOURCE: reductions/dgp2dcp/canonicalizers/eye_minus_inv_canon.py
## DGP canonicalizer for EyeMinusInv: (I - X)^{-1}
##
## Introduces auxiliary variable U (= log(Y)) where Y >= (I-X)^{-1}.
## Constraint: diag(Y - Y*X) >= 1, canonicalized in log-space as:
## diag(U + one_minus_pos_canon(YX_canon - U)) >= 0
.dgp_eye_minus_inv_canon <- function(expr, args) {
X <- args[[1L]]
n <- expr@args[[1L]]@shape[1L]
## U = log(Y), a new free variable in log-space
U <- Variable(c(n, n))
## YX in log-space: matmul(U, X) -- but we need DGP canonicalization
## YX = U %*% X (log-space matmul)
YX <- U %*% X
YX_canon <- .dgp_mulexpression_canon(YX, YX@args)[[1L]]
## one_minus_pos(YX_canon - U): log(1 - exp(YX_canon - U))
omp_expr <- OneMInusPos(YX_canon - U)
omp_canon <- .dgp_one_minus_pos_canon(omp_expr, omp_expr@args)[[1L]]
## diag(U + omp_canon) >= 0
lhs_canon <- DiagMat(U + omp_canon)
list(U, list(lhs_canon >= 0))
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.