Commit 55afa21
closes issue probabl-ai#1364
- incorporated:
- [x] sklearn.linear_model.GammaRegressor()
- [x] sklearn.linear_model.PoissonRegressor()
- [x] sklearn.compose.TransformedTargetRegressor()
- [ ] sklearn.cross_decomposition.CCA()
- [ ] sklearn.cross_decomposition.PLSCanonical()
- [ ] sklearn.linear_model.MultiTaskElasticNet()
- [ ] sklearn.linear_model.MultiTaskElasticNetCV()
- [ ] sklearn.linear_model.MultiTaskLasso()
- [ ] sklearn.linear_model.MultiTaskLassoCV()
- [ ] sklearn.svm.OneClassSVM()
- [ ] sklearn.linear_model.SGDOneClassSVM()
- other changes:
- [x] handling estimators that does not support `coef_` and/or
`intercept_` when creating `coefficients()` in EstimatorReport
- [x] removed sklearn.linear_model.Lasso() --> duplicate entry
- [x] updated `_check_has_coef` and `coefficients()` to handle cases of
meta estimators (updated tests accordingly)
- [x] reorganised the commented models
- need feedback on:
- [x] is there a better(cleaner) way to get data? -- right now I've
created different fixtures for `positive_regression_data`,
`multi_regression_data`, `outlier_data` and `clustering_data` -- but all
these are only used once in this one test (i.e.
`test_all_sklearn_estimators`).
- [x] for `TransformedTargetRegressor` should we modify the
`_check_has_coef` in `skore/src/skore/utils/_accessor.py` to not just
check if the `hasattr(estimator, "coef_")` is true but also check if
`hasattr(estimator.regressor_, "coef_")` is also true
([here](https://github.com/probabl-ai/skore/blob/main/skore/src/skore/utils/_accessor.py#L60))?
or should we exclude `TransformedTargetRegressor` from this test?
- [x] even though the tests passed locally, I'm not sure about how I've
incorporated `sklearn.cross_decomposition.CCA()` and
`sklearn.cross_decomposition.PLSCanonical()`
- [ ] any other feedback that you would like to give!
Thanks :)
---------
Co-authored-by: Guillaume Lemaitre <[email protected]>
Co-authored-by: Auguste Baum <[email protected]>
1 parent 2f3496e commit 55afa21
File tree
5 files changed
+83
-29
lines changed- skore
- src/skore
- sklearn/_estimator
- utils
- tests/unit
- sklearn/estimator/feature_importance
- utils
5 files changed
+83
-29
lines changedLines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
210 | 224 | | |
211 | 225 | | |
212 | 226 | | |
| |||
217 | 231 | | |
218 | 232 | | |
219 | 233 | | |
220 | | - | |
| 234 | + | |
221 | 235 | | |
222 | 236 | | |
223 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
10 | 17 | | |
11 | 18 | | |
12 | 19 | | |
Lines changed: 42 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | | - | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | 127 | | |
130 | 128 | | |
131 | 129 | | |
132 | 130 | | |
133 | 131 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
138 | 136 | | |
139 | | - | |
140 | 137 | | |
141 | 138 | | |
142 | 139 | | |
143 | 140 | | |
144 | | - | |
| 141 | + | |
145 | 142 | | |
146 | 143 | | |
147 | 144 | | |
| |||
157 | 154 | | |
158 | 155 | | |
159 | 156 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | 157 | | |
169 | 158 | | |
170 | 159 | | |
| |||
182 | 171 | | |
183 | 172 | | |
184 | 173 | | |
185 | | - | |
| 174 | + | |
186 | 175 | | |
187 | 176 | | |
188 | 177 | | |
189 | 178 | | |
190 | 179 | | |
191 | 180 | | |
192 | | - | |
193 | 181 | | |
194 | 182 | | |
195 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
196 | 202 | | |
197 | 203 | | |
198 | 204 | | |
199 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
200 | 210 | | |
201 | 211 | | |
202 | 212 | | |
203 | 213 | | |
204 | 214 | | |
205 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
206 | 219 | | |
207 | | - | |
| 220 | + | |
208 | 221 | | |
209 | 222 | | |
210 | 223 | | |
211 | 224 | | |
212 | 225 | | |
213 | 226 | | |
214 | | - | |
215 | | - | |
| 227 | + | |
216 | 228 | | |
217 | 229 | | |
218 | 230 | | |
219 | 231 | | |
220 | 232 | | |
221 | 233 | | |
222 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
223 | 241 | | |
224 | 242 | | |
225 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
| |||
0 commit comments