What Does This >> Operator Do?

I can’t find a simple reference to explain what this >> operator does. It seems to have different uses based on the context? For example, in this walkthrough I found a code snippet:

combined_features = item_features >> UnrollFeatures(
    "item_id", user_features[user_features_to_unroll]
)

Is there a simple explanation for what that operator does? Thank you!

Hey @xdageorg. Found one the docs:

A ColumnSelector describes a group of columns to be transformed by Operators in a Graph. Operators can be applied to the selected columns by shifting (>>) operators on to the ColumnSelector, which returns a new Node with the transformations applied. This lets you define a graph of operations that makes up your Graph.

If you’d like to dive deeper, note the rrshift implementation in merlin.dag.base_operator which is the parent class of UnrollFeatures

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.