This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate PrefixColumnConcatenator with entry point compiler instead o…
…f manually. (#364)
- Loading branch information
Showing
5 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
""" | ||
|
||
Combines several columns into a single vector-valued column by prefix. | ||
|
||
.. remarks:: | ||
``PrefixColumnConcatenator`` creates a single vector-valued column from | ||
multiple | ||
columns. It can be performed on data before training a model. The | ||
concatenation | ||
can significantly speed up the processing of data when the number of | ||
columns | ||
is as large as hundreds to thousands. | ||
|
||
:param columns: a dictionary of key-value pairs, where key is the output | ||
column name and value is a list of input column names. | ||
|
||
* Only one key-value pair is allowed. | ||
* Input column type: numeric or string. | ||
* Output column type: | ||
`Vector Type </nimbusml/concepts/types#vectortype-column>`_. | ||
|
||
The << operator can be used to set this value (see | ||
`Column Operator </nimbusml/concepts/columns>`_) | ||
|
||
For example | ||
* ColumnConcatenator(columns={'features': ['age', 'parity', | ||
'induced']}) | ||
* ColumnConcatenator() << {'features': ['age', 'parity', | ||
'induced']}) | ||
|
||
For more details see `Columns </nimbusml/concepts/columns>`_. | ||
|
||
.. seealso:: | ||
:py:class:`ColumnDropper | ||
<nimbusml.preprocessing.schema.ColumnDropper>`, | ||
:py:class:`ColumnSelector | ||
<nimbusml.preprocessing.schema.ColumnSelector>`. | ||
|
||
.. index:: transform, schema | ||
|
||
Example: | ||
.. literalinclude:: /../nimbusml/examples/PrefixColumnConcatenator.py | ||
:language: python | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters