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

[AIR] Add KBinsDiscretizer #28389

Merged
merged 7 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/custom_directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def update_context(app, pagename, templatename, context, doctree):
"dask.distributed",
"datasets",
"datasets.iterable_dataset",
"datasets.load",
bveeramani marked this conversation as resolved.
Show resolved Hide resolved
"gym",
"gym.spaces",
"horovod",
Expand Down
9 changes: 9 additions & 0 deletions doc/source/ray-air/package-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ Feature Scalers
.. autoclass:: ray.data.preprocessors.StandardScaler
:show-inheritance:

K-Bins Discretizers
Copy link
Member

Choose a reason for hiding this comment

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

Would a more-general Discretizers be better? I see sklearn does something similar in their user guide https://scikit-learn.org/stable/modules/preprocessing.html#discretization

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, makes sense!

###################

.. autoclass:: ray.data.preprocessors.CustomKBinsDiscretizer
:show-inheritance:

.. autoclass:: ray.data.preprocessors.UniformKBinsDiscretizer
:show-inheritance:
bveeramani marked this conversation as resolved.
Show resolved Hide resolved

Text Encoders
#############

Expand Down
6 changes: 6 additions & 0 deletions python/ray/data/preprocessors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
from ray.data.preprocessors.tokenizer import Tokenizer
from ray.data.preprocessors.transformer import PowerTransformer
from ray.data.preprocessors.vectorizer import CountVectorizer, HashingVectorizer
from ray.data.preprocessors.discretizer import (
CustomKBinsDiscretizer,
UniformKBinsDiscretizer,
)

__all__ = [
"BatchMapper",
Expand All @@ -41,4 +45,6 @@
"StandardScaler",
"Concatenator",
"Tokenizer",
"CustomKBinsDiscretizer",
"UniformKBinsDiscretizer",
]
Loading