Skip to main content
This step essentially just adds metadata to the input columns to ensure Graphext knows that these columns define network links and that they belong to the same set of links (there can be multiple “layers” of links in the same dataset). But it also makes sure all links are valid. E.g. that they don’t refer to rows that don’t exist, that attributes match the number of target rows etc.

Usage

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

Examples

  • Example 1
  • Signature
To simply link rows using a default weight of 1.0
link_rows_by_rownum(ds.targets_in, ds.weights_in) -> (ds.valid_targets, ds.valid_weights)

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").
targets_in
column[number|list[number]]
required
A column of lists containing numeric IDs corresponding to the rows acting as the targets of links.
*attrs_in
column
Optional corresponding lists of weights and/or other attributes for those targets.
targets_out
column
required
Column containing new targets.
*attrs_out
column
If optional inputs were provided, new weight/attribute columns between connected nodes.

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).

Parameters

weight_column
[string, null]
required
Name of the column acting as the weights of the links. Must refer to one of the optional columns passed to the step. If null, an extra output column will be created containing a weight of 1.0 for each link defined in the target column (unless a weight_factor is applied, in which the weights will have the corresponding value, see below).
weight_factor
number
default:"1.0"
Multiply link weights by this number. If an input column with weights was identified using weight_column, the values in that column will be multiplied by this factor. If no weights were passed in, the newly added weights will all have this value.
I