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

Return onehot interval instead of categorical #447

Merged

Conversation

bouthilx
Copy link
Member

Why:

When the categorical dimension is transformed to one-hot, the interval
returned should be in the space of the one-hot otherwise the algorithm
requesting a real space cannot handle the categories.

How:

Add an interval method to OneHot Transformer.
TransformerDimension will look for an interval method, otherwise use the
default interval of original dimension.
Note that CompositeTransformer push the interval() method recursively if
necessary, so that a one-hot encoding that is part of a composite
transformer can still provide its interval().

@bouthilx bouthilx requested a review from Thomsch August 26, 2020 19:11
@bouthilx bouthilx added this to the v0.1.9 milestone Aug 26, 2020
@bouthilx bouthilx force-pushed the feature/onehot_categorical_interval branch from a881d65 to 45f987a Compare August 26, 2020 19:14
Why:

When the categorical dimension is transformed to one-hot, the interval
returned should be in the space of the one-hot otherwise the algorithm
requesting a real space cannot handle the categories.

How:

Add an interval method to OneHot Transformer.
TransformerDimension will look for an interval method, otherwise use the
default interval of original dimension.
Note that CompositeTransformer push the interval() method recursively if
necessary, so that a one-hot encoding that is part of a composite
transformer can still provide its interval().
@bouthilx bouthilx force-pushed the feature/onehot_categorical_interval branch from 45f987a to 7ea196b Compare August 26, 2020 19:17
@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2020

Codecov Report

Merging #447 into develop will increase coverage by 0.00%.
The diff coverage is 12.50%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #447   +/-   ##
========================================
  Coverage    49.47%   49.48%           
========================================
  Files           80       80           
  Lines        13808    13822   +14     
  Branches       348      348           
========================================
+ Hits          6832     6840    +8     
- Misses        6960     6966    +6     
  Partials        16       16           
Impacted Files Coverage Δ
tests/unittests/core/test_transformer.py 21.56% <12.50%> (-0.11%) ⬇️
...ts/functional/serving/test_experiments_endpoint.py
...ts/functional/serving/test_experiments_resource.py 100.00% <0.00%> (ø)
tests/functional/demo/test_demo.py 97.69% <0.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5732d3...7ea196b. Read the comment docs.

bouthilx added a commit to bouthilx/orion.algo.skopt that referenced this pull request Aug 26, 2020
Why:

Categorical used to return the categories even when there was a one-hot
encoding of it. Since PR Epistimio/orion#447,
the one-hot transformer now returns the proper interval in (0, 1) in
vector of the size equal to number of dimensions.
@bouthilx
Copy link
Member Author

@bouthilx bouthilx merged commit c42cc02 into Epistimio:develop Aug 27, 2020
This was referenced Nov 5, 2020
bouthilx added a commit to bouthilx/orion.algo.skopt that referenced this pull request Dec 1, 2020
Why:

Categorical used to return the categories even when there was a one-hot
encoding of it. Since PR Epistimio/orion#447,
the one-hot transformer now returns the proper interval in (0, 1) in
vector of the size equal to number of dimensions.
bouthilx added a commit to bouthilx/orion.algo.skopt that referenced this pull request Dec 4, 2020
Why:

Categorical used to return the categories even when there was a one-hot
encoding of it. Since PR Epistimio/orion#447,
the one-hot transformer now returns the proper interval in (0, 1) in
vector of the size equal to number of dimensions.
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.

3 participants