For each row this step iterates over the IDs in the targets_in column, and if an ID exists also in the source column, the corresponding rows will be connected, optionally with specified attributes.

The targets_in column may contain one target ID per row, or lists of target IDs. In either case, any additional attribute columns should be of the same type. I.e. if each row specifies multiple links via lists in targets_in, then attribute columns should also contain lists of the same length, such that each link can be assigned its corresponding attribute. If the lengths of lists containing target IDs and attributes do not match, the attributes for links in that row will be missing. If attributes are single-valued (not containing lists), all links specified in that row will have the same attribute value.

Note that the types of values in source and link_targets identifying the nodes/rows to be linked should also match. Ideally, either both columns have numeric values or both have string-like (categorical) values. However, as long as one can be converted safely to the other, linking will work as expected (e.g. source IDs could be specified as numbers [0, 1, 2] and target IDs as strings [“3”, “2”, “1”] without the step failing).

The step will generate at least target and weight columns, as well as another column for each input. If link attribute columns were passed, the weight_column parameter should be used to identify the column containing link weights (importances). If there is no such column, the parameter value should be null, in which case an new weights column will be generated automatically (see parameters below).

Usage

The following example shows how the step can be used in a recipe.

Inputs & Outputs

The following are the inputs expected by the step and the outputs it produces. These are generally columns (ds.first_name), datasets (ds or ds[["first_name", "last_name"]]) or models (referenced by name e.g. "churn-clf").

Configuration

The following parameters can be used to configure the behaviour of the step by including them in a json object as the last “input” to the step, i.e. step(..., {"param": "value", ...}) -> (output).