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

[FSTORE-1672] Allow multiple on-demand features to be returned from an on-demand transformation function and allow passing of local variables to a transformation function #439

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

manu-sj
Copy link
Contributor

@manu-sj manu-sj commented Feb 3, 2025

@manu-sj manu-sj requested a review from bubriks February 3, 2025 08:32
An on-demand transformation function may be created by associating a [transformation function](../transformation_functions.md) with a feature group. Each on-demand transformation function generates a single on-demand feature, which, by default, is assigned the same name as the associated transformation function. For instance, in the example below, the on-demand transformation function `transaction_age` produces an on-demand feature named transaction_age. Alternatively, the name of the resulting on-demand feature can be explicitly defined using the [`alias`](../transformation_functions.md#specifying-output-features–names-for-transformation-functions) function.

It is important to note that only one-to-one or many-to-one transformation functions are compatible with the creation of on-demand transformation functions.
An on-demand transformation function may be created by associating a [transformation function](../transformation_functions.md) with a feature group. Each on-demand transformation function can generate one or multiple on-demand features. If the on-demand transformation function returns a single feature, it is automatically assigned the same name as the transformation function. However, if it returns multiple features, they are by default named using the format `functionName_outputColumnNumber`. For instance, in the example below, the on-demand transformation function `transaction_age` produces an on-demand feature named `transaction_age` and the on-demand transformation function `stripped_strings` produces the on-demand features names `stripped_strings_0` and `stripped_strings_1`. Alternatively, the name of the resulting on-demand feature can be explicitly defined using the [`alias`](../transformation_functions.md#specifying-output-features–names-for-transformation-functions) function.
Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't it be functionName_outputTupleElementIndex instead of functionName_outputColumnNumber (maybe i am misunderstanding)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Basically it is mean the same maybe there might be a better way of phrasing things, I gave it outputColumnNumber since a pandasDataFrame can also be return to return multiple features from a transformation function and in that case it depends on the column number.

In general each output feature is named based on the position in the output tuple or Dataframe.

@manu-sj manu-sj merged commit 83e323c into logicalclocks:main Feb 3, 2025
1 check passed
manu-sj added a commit to manu-sj/logicalclocks.github.io that referenced this pull request Feb 3, 2025
…n on-demand transformation function and allow passing of local variables to a transformation function (logicalclocks#439)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants