File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
claims_hosp/delphi_claims_hosp Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 7
7
# third party
8
8
import cvxpy as cp
9
9
import numpy as np
10
+ from cvxpy .error import SolverError
10
11
11
12
# first party
12
13
from .config import Config
@@ -83,7 +84,7 @@ def get_params(data):
83
84
try :
84
85
prob = cp .Problem (cp .Minimize (- ll + lmbda * penalty ))
85
86
_ = prob .solve ()
86
- except :
87
+ except SolverError :
87
88
# If the magnitude of the objective function is too large, an error is
88
89
# thrown; Rescale the objective function
89
90
prob = cp .Problem (cp .Minimize ((- ll + lmbda * penalty ) / 1e5 ))
Original file line number Diff line number Diff line change 7
7
# third party
8
8
import cvxpy as cp
9
9
import numpy as np
10
+ from cvxpy .error import SolverError
10
11
11
12
# first party
12
13
from .config import Config
@@ -83,7 +84,7 @@ def get_params(data):
83
84
try :
84
85
prob = cp .Problem (cp .Minimize (- ll + lmbda * penalty ))
85
86
_ = prob .solve ()
86
- except :
87
+ except SolverError :
87
88
# If the magnitude of the objective function is too large, an error is
88
89
# thrown; Rescale the objective function
89
90
prob = cp .Problem (cp .Minimize ((- ll + lmbda * penalty ) / 1e5 ))
Original file line number Diff line number Diff line change 7
7
# third party
8
8
import cvxpy as cp
9
9
import numpy as np
10
+ from cvxpy .error import SolverError
10
11
11
12
# first party
12
13
from .config import Config
@@ -83,7 +84,7 @@ def get_params(data):
83
84
try :
84
85
prob = cp .Problem (cp .Minimize (- ll + lmbda * penalty ))
85
86
_ = prob .solve ()
86
- except :
87
+ except SolverError :
87
88
# If the magnitude of the objective function is too large, an error is
88
89
# thrown; Rescale the objective function
89
90
prob = cp .Problem (cp .Minimize ((- ll + lmbda * penalty ) / 1e5 ))
You can’t perform that action at this time.
0 commit comments