-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
update power transformer user guide #759
update power transformer user guide #759
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #759 +/- ##
=======================================
Coverage 98.18% 98.18%
=======================================
Files 105 105
Lines 4074 4074
Branches 795 795
=======================================
Hits 4000 4000
Misses 29 29
Partials 45 45 ☔ View full report in Codecov by Sentry. |
@@ -5,66 +5,349 @@ | |||
PowerTransformer | |||
================ | |||
|
|||
The :class:`PowerTransformer()` applies power or exponential transformations to numerical | |||
variables. | |||
Power transformations are a family of mathematical functions used to transform numerical variables into a more suitable shape for modeling. The transformation function is typically represented as :math:`x' = x^\\lambda`, where :math:`x` is the original variable and :math:`\\lambda` is the transformation parameter. |
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.
Hey @cmcouto-silva thanks for the PR. Could you please break all lines so that they are around 88 characters max?
just need to press enter at the 88 char height and reorganize the text a bit all throughout the document. Thank you!
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.
Will do!
@@ -5,66 +5,349 @@ | |||
PowerTransformer | |||
================ | |||
|
|||
The :class:`PowerTransformer()` applies power or exponential transformations to numerical | |||
variables. | |||
Power transformations are a family of mathematical functions used to transform numerical variables into a more suitable shape for modeling. The transformation function is typically represented as :math:`x' = x^\\lambda`, where :math:`x` is the original variable and :math:`\\lambda` is the transformation parameter. |
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.
the exponential math function is not rendering as it should. Did you try building the docs?
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 built it to see the tests, but I haven't checked it rendered yet. I'm checking it now and arranging the fixes. Thx for the heads up!
|
||
Most variable transformations, like the logarithm, the reciprocal and the square root, are special cases of power transformations, where the exponent (lambda) is 0, -1 and 0.5, respectively. | ||
|
||
You can apply these transformations with :class:`PowerTransformer()`, as we will see later in this page, or through dedicated transformers, like :class:`LogarithmTransformer` and :class:`ReciprocalTransformer`. |
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.
It's Logtransformer instead of LogarithmTransformer, that's why it does not link to the corresponding page
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.
Fixed, I'll update the PR soon!
Python example | ||
-------------- | ||
|
||
:class:`PowerTransformer()` applies power transformations to numerical independent variables. We'll use the Ames House Prices' dataset to see it in action. First, let's load the dataset and split it into train and test sets: | ||
|
||
.. code:: python |
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.
one : not 2
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 didn't get this. Where should it be one, not 2?
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.
.. code:
instead of .. code::
I think. This code block is not rendering properly.
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.
Oh, ok! The error was due to ..code instead of .. code (with space between .. and code). Thx!
@cmcouto-silva FYI Check this PR and we are good to go: cmcouto-silva#2 |
minor format fixes
Updating the PowerTransformer UserGuide with more text and code examples.