This repository was archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit 1a41080
ENH: Surface more errors from the glmnet solver
The glmnet solver uses integer codes to communicate errors and warnings.
The error code returned by then solver is saved to the attribute `jerr`
after fitting a model. Negative values denote warnings such as
convergence issues, positive values denote fatal conditions such as
memory allocation problems, and a value of zero is used when the solver
runs successfully without error.
Initially we translated the convergence warnings into more complete
messages from the numeric code. For all other errors, we just returned
something opaque like "glmnet error no. 123."
In this PR, we add some additional messages and raise the relevant type
of warning or exception.1 parent f7f2cc2 commit 1a41080
File tree
6 files changed
+94
-19
lines changed- glmnet
- tests
6 files changed
+94
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | + | ||
10 | 11 | | |
11 | 12 | | |
12 | - | ||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | - | ||
316 | + | ||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | + | ||
12 | 13 | | |
13 | 14 | | |
14 | - | ||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | - | ||
365 | + | ||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | + | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
| |||
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
87 | - | ||
96 | + | ||
88 | 97 | | |
89 | 98 | | |
90 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | - | ||
130 | - | ||
131 | - | ||
132 | - | ||
133 | - | ||
134 | - | ||
135 | - | ||
136 | - | ||
137 | - | ||
138 | - | ||
139 | - | ||
140 | - | ||
141 | - | ||
142 | - | ||
143 | 129 | | |
144 | 130 | | |
145 | 131 | | |
| |||
0 commit comments