KhiopsML / khiops-python

The Python library of the Khiops AutoML suite
https://khiops.org
BSD 3-Clause Clear License
10 stars 1 forks source link

256 handle khiopsencoder edge case when there are no output features #274

Open folmos-at-orange opened 2 weeks ago

folmos-at-orange commented 2 weeks ago

commit f2fbf7228bc6f11fee0ce6148a19e312d36787c4 (HEAD -> 256-handle-khiopsencoder-edge-case-when-there-are-no-output-features, origin/256-handle-khiopsencoder-edge-case-when-there-are-no-output-features) Author: Felipe Olmos 92923444+folmos-at-orange@users.noreply.github.com Date: Wed Nov 6 16:58:32 2024 +0100

Make unused-import pylint rule a failure

commit 43da1c1e97943cc7ac1555b287d0414d66467197 Author: Felipe Olmos 92923444+folmos-at-orange@users.noreply.github.com Date: Wed Nov 6 14:49:48 2024 +0100

Set KhiopsEncoder to "unfit" when there are no informative vars

If there are no informative vars for `KhiopsEncoder` we declare the fit
as a failed an undefine all attributes.

Note that we use the sklearn convention that an estimator is fitted if
and only if no attributes are defined. Estimator attributes are
conventionally defined as public attributes whose name have a suffix
`_`.

commit 853b10acca78ba0f3d5a64e58d24469d213022e3 Author: Felipe Olmos 92923444+folmos-at-orange@users.noreply.github.com Date: Wed Nov 6 10:24:35 2024 +0100

Fix KhiopsEstimator sklearn integration tests

We do not skip anymore any of the sklearn.utils.estimator_checks for the
KhiopsEstimator class. We just parametrize the instance so it always
have a non-empty encoder.

A non-empty encoder may happen with the MODL encoding when there are no
informative variables.
folmos-at-orange commented 3 days ago

I would update the second commit's message to reflect the fact that attributes are unset for all estimators if fitting fails, for whatever reason.

Done (clarified the commit).