Skip to content

fix bug in clip_outlier in class RobustZScoreNorm(Processor)#1294

Merged
you-n-g merged 1 commit intomicrosoft:mainfrom
NotF404:fix_process
Nov 11, 2022
Merged

fix bug in clip_outlier in class RobustZScoreNorm(Processor)#1294
you-n-g merged 1 commit intomicrosoft:mainfrom
NotF404:fix_process

Conversation

@NotF404
Copy link
Contributor

@NotF404 NotF404 commented Sep 15, 2022

bug
it's clear, since just few lines of change.

Description

current behaver: clip_outlier in RobustZScoreNorm clip all the values in dataframe
should be: clip_outlier should just clip the group speicified by arg fields_group

e.g.
If the input dataframe contain a label lager than 3, RobustZScoreNorm will clip it to 3. (close price for example)
this pic shows right results, after fixing with this patch:
image

this pic shows wrong results, which is current results:
image

Motivation and Context

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@ChiahungTai
Copy link
Collaborator

@you-n-g Will you review this patch?

@NotF404
Copy link
Contributor Author

NotF404 commented Nov 8, 2022

@you-n-g I edit this pr to make it clear, please let me know if any question.

@NotF404 NotF404 changed the title fix bug in fix clip_outlier in class RobustZScoreNorm(Processor) fix bug in clip_outlier in class RobustZScoreNorm(Processor) Nov 8, 2022
@you-n-g
Copy link
Collaborator

you-n-g commented Nov 11, 2022

Thanks!
It looks great to me!
Welcome to become one of Qlib's contributors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants