This commit is contained in:
Morten Hjorth-Jensen
2021-09-12 21:41:47 +02:00
parent 61f5aed38a
commit c11ddddf61
7 changed files with 61 additions and 53 deletions
+11 -8
View File
@@ -910,14 +910,6 @@ simpler problem we discussed above, where we have added the latter
python file.
!bc pycod
from l1regls import l1regls
from cvxopt import matrix, normal
import numpy as np
X = matrix( [ [ 2, 0, 1], [0, 1, 3]])
y = matrix( [4, 2, 3])
x = l1regls(X,y)
from cvxopt import matrix, spdiag, mul, div, sqrt, normal, setseed
from cvxopt import blas, lapack, solvers, sparse, spmatrix
import math
@@ -1176,6 +1168,17 @@ def l1regls(A, b):
return solvers.coneqp(P, q, G, h, kktsolver = Fkkt)['x'][:n]
#from l1regls import l1regls
from cvxopt import matrix, normal
X = matrix( [ [ 2, 0, 1], [0, 1, 3]])
y = matrix( [4, 2, 3])
x = l1regls(X,y)
!ec
!split