8000 [MRG] Fix bug with categorical spaces with different types of ca… by stefanocereda · Pull Request #752 · scikit-optimize/scikit-optimize · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

[MRG] Fix bug with categorical spaces with different types of ca… #752

Merged
merged 2 commits into from
Jan 14, 2020

Conversation

stefanocereda
Copy link
Contributor
@stefanocereda stefanocereda commented Apr 3, 2019

Closes #704
The problem happened with categorical domains with different data types, like [['a', 'b'], [True, False]].
When the space is categorical the transformer is an identity, so the data keep their type. When stacking different types into a numpy array, they all become strings, losing their types.
The identity transformer is now able to translate everything into a string and then transform back into the original data type.
However, mixed categories like [['a', True]] are (still) not supported.

@betatim betatim changed the title [MRG] Fix bug with categorical spaces with different types of categories [MRG] Fix bug with categorical spaces with different types of ca… Jan 14, 2020
@betatim betatim merged commit 7720fda into scikit-optimize:master Jan 14, 2020
@betatim
Copy link
Member
betatim commented Jan 14, 2020

Merged on advice of @holgern

vakker pushed a commit to vakker/scikit-optimize that referenced this pull request Jan 14, 2020
…ikit-optimize#752)

* Fix bug with categorical spaces with different types of categories

* fix for python2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
4CD6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected type conversion in categorical space
2 participants
0