Skip to content

Make categorical encoders multisegment #554

Merged
merged 5 commits into from
Feb 22, 2022
Merged

Conversation

alex-hse-repository
Copy link
Collaborator

@alex-hse-repository alex-hse-repository commented Feb 21, 2022

IMPORTANT: Please do not create a Pull Request without creating an issue first.

Before submitting (must do checklist)

  • Did you read the contribution guide?
  • Did you update the docs? We use Numpy format for all the methods and classes.
  • Did you write any new necessary tests?
  • Did you update the CHANGELOG?

Type of Change

  • Examples / docs / tutorials / contributors update
  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Proposed Changes

Related Issue

Closing issues

closes #532

@alex-hse-repository alex-hse-repository added the enhancement New feature or request label Feb 21, 2022
@alex-hse-repository alex-hse-repository self-assigned this Feb 21, 2022
np.testing.assert_array_almost_equal(le.transform(df2).values, expected_values)
df2_transformed = le.transform(df2)
for segment in segments:
values = df2_transformed.loc[pd.IndexSlice[:], pd.IndexSlice[segment, "encoded_regressor_0"]].values
Copy link
Contributor

Choose a reason for hiding this comment

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

df2_transformed.loc[:, pd.IndexSlice[segment, "encoded_regressor_0"]].values

np.testing.assert_array_almost_equal(ohe.transform(df2).values, expected_values)
df2_transformed = ohe.transform(df2)
for segment in segments:
values = df2_transformed.loc[pd.IndexSlice[:], pd.IndexSlice[segment, out_columns]].values
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2022

Codecov Report

Merging #554 (4a56059) into master (ce01de0) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #554      +/-   ##
==========================================
- Coverage   87.27%   87.25%   -0.02%     
==========================================
  Files         118      118              
  Lines        5688     5681       -7     
==========================================
- Hits         4964     4957       -7     
  Misses        724      724              
Impacted Files Coverage Δ
etna/transforms/encoders/categorical.py 100.00% <100.00%> (ø)

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 ce01de0...4a56059. Read the comment docs.

@alex-hse-repository alex-hse-repository merged commit 9824f3f into master Feb 22, 2022
@iKintosh iKintosh deleted the issue-532 branch March 22, 2022 08:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make categorical encoders multisegment
3 participants