> ## Documentation Index
> Fetch the complete documentation index at: https://docs.graphext.com/llms.txt
> Use this file to discover all available pages before exploring further.

# link_sequence_items

> Create network links between consecutive pairs in a column of sequences. 

## Usage

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

<Accordion title="Examples" icon="code" defaultOpen="true">
  <Tabs>
    <Tab title="Example 1">
      ```stan theme={null}
      link_sequence_items(ds.items, ds.sequences) -> (ds.targets, ds.weights)
      ```
    </Tab>

    <Tab title="Signature">
      General syntax for using the step in a recipe. Shows the inputs and outputs the step is expected to receive and will produce respectively. For futher details see sections below.

      ```stan theme={null}
      link_sequence_items(items: number|category, sequences: list[category]|list[number]
      ) -> (targets: column, weights: column)
      ```
    </Tab>
  </Tabs>
</Accordion>

## 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"`).

<Accordion title="Inputs" icon="right-to-bracket">
  <ParamField path="items" type="column[number|category]" required>
    A column of items. Should contain unique IDs identifying each item, and corresponding
    to the IDs in the sequences column.
  </ParamField>

  <ParamField path="sequences" type="column[list[category]|list[number]]" required>
    Sequences (lists) of items, corresponding to the IDs in the items column.
  </ParamField>
</Accordion>

<Accordion title="Outputs" icon="right-from-bracket">
  <ParamField path="targets" type="column" required>
    A column containing for each item a list of row numbers identfying other items it
    will be linked to.
  </ParamField>

  <ParamField path="weights" type="column" required>
    A column containing for each item a list of weights identfying the "importance" of each
    link to other items identified in the `targets` column (counting how many times a consecutive
    pair of items was found together in the sequences).
  </ParamField>
</Accordion>

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

<Accordion title="Parameters" defaultOpen="true" icon="sliders">
  This step doesn't expect any configuration.
</Accordion>
