-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Introduce INF/NAN string values normalizer #19
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I think we need a new name for the middleware class though.
/** | ||
* @var array<string, float> | ||
*/ | ||
private array $replacements = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this could be a constant
@@ -0,0 +1,59 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is 'Normalize' really what this class is doing? I think the naming could work in other domains but since we're in the context of machine learning maybe we choose a different word. Normalize has a specific meaning in ML.
On the contrary, maybe InfNan is too specific. We might need to convert others in the future in which case the naming would not be valid. Naming is hard.
Would ConvertRequestBodyConstants
work?
@@ -0,0 +1,99 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice test!
No description provided.