Calculate association rules for a items/products in a dataset of transactions.
Examples
ds.first_name
), datasets (ds
or ds[["first_name", "last_name"]]
) or models (referenced
by name e.g. "churn-clf"
).
Inputs
Outputs
step(..., {"param": "value", ...}) -> (output)
.
Parameters
Array items
Options
itemset_support_abs
itemset_support_pct
antecedent_support_abs
antecedent_support_pct
consequent_support_abs
consequent_support_pct
rule_confidence_pct
rule_lift_abs
rule_lift_pct
weight_metric
parameter,
i.e. corresponds to one of the association rule metrics (support, confidence etc.). If null
,
all links will be kept.sum
aggregation of column A calculates a single
total by adding up all the values in A belonging to each item.Possible aggregations functions accepted as func
parameters are:n
, size
or count
: calculate number of rows in groupsum
: sum total of valuesmean
: take mean of valuesmax
: take max of valuesmin
: take min of valuesfirst
: take first item foundlast
: take last item foundunique
: collect a list of unique valuesn_unique
: count the number of unique valueslist
: collect a list of all valuesconcatenate
: convert all values to text and concatenate them into one long textconcat_lists
: concatenate lists in all rows into a single larger listcount_where
: number of rows in which the column matches a value, needs parameter value
with the value that you want to countpercent_where
: percentage of the column where the column matches a value, needs parameter value
with the value that you want to countcount_where
and percent_where
an additional value
parameter is required.sum
aggregation of column A calculates a single
total by adding up all the values in A belonging to each item.Possible aggregations functions accepted as func
parameters are:n
, size
or count
: calculate number of rows in groupsum
: sum total of valuesmean
: take mean of valuesmax
: take max of valuesmin
: take min of valuesfirst
: take first item foundlast
: take last item foundunique
: collect a list of unique valuesn_unique
: count the number of unique valueslist
: collect a list of all valuesconcatenate
: convert all values to text and concatenate them into one long textconcat_lists
: concatenate lists in all rows into a single larger listcount_where
: number of rows in which the column matches a value, needs parameter value
with the value that you want to countpercent_where
: percentage of the column where the column matches a value, needs parameter value
with the value that you want to countcount_where
and percent_where
an additional value
parameter is required.