Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

74 support boolean and floating point targets in khiops classifiers #306

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

nairbenrekia
Copy link
Collaborator

@nairbenrekia nairbenrekia commented Dec 11, 2024

closes #128 , #74


TODO Before Asking for a Review

  • Rebase your branch to the latest version of dev (or main for release PRs)
  • Make sure all CI workflows are green
  • When adding a public feature/fix: Update the Unreleased section of CHANGELOG.md (no date)
  • Self-Review: Review "Files Changed" tab and fix any problems you find
  • API Docs (only if there are changes in docstrings, rst files or samples):
    • Check the docs build without warning: see the log of the API Docs workflow
    • Check that your changes render well in HTML: download the API Docs artifact and open index.html
    • If there are any problems it is faster to iterate by building locally the API Docs

@nairbenrekia nairbenrekia linked an issue Dec 11, 2024 that may be closed by this pull request
@nairbenrekia nairbenrekia force-pushed the 74-support-floating-point-targets-in-khiops-classifiers branch 2 times, most recently from 19ebe3c to 3ab19e4 Compare December 11, 2024 13:45
@nairbenrekia nairbenrekia self-assigned this Dec 11, 2024
khiops/samples/samples_sklearn.py Outdated Show resolved Hide resolved
tests/test_sklearn_output_types.py Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@nairbenrekia nairbenrekia force-pushed the 74-support-floating-point-targets-in-khiops-classifiers branch from 3ab19e4 to 8b5328e Compare December 11, 2024 16:24
@folmos-at-orange folmos-at-orange linked an issue Dec 11, 2024 that may be closed by this pull request
@nairbenrekia nairbenrekia force-pushed the 74-support-floating-point-targets-in-khiops-classifiers branch from 8b5328e to 4f772b2 Compare December 11, 2024 16:59
elif pd.api.types.is_float_dtype(self._original_target_dtype):
y_pred = y_pred.astype(float, copy=False)
elif pd.api.types.is_bool_dtype(self._original_target_dtype):
y_pred = y_pred.astype(bool, copy=False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work. A fix

y_pred = y_pred.map(lambda val: val == "True")

@folmos-at-orange folmos-at-orange linked an issue Dec 16, 2024 that may be closed by this pull request
@popescu-v popescu-v changed the title 74 support floating point targets in khiops classifiers 74 support boolean and floating point targets in khiops classifiers Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support bool column types in KhiopsClassifier Support floating-point targets in Khiops classifiers
2 participants