Prepare the data
Encode anonymised transactions as item-presence rows without customer identifiers.
Find co-occurrence. Check the base rates.
Association rules describe items frequently observed together. Support, confidence and lift help distinguish common products from combinations that occur more often than expected.
Learning concept · Not a validated service
Association rules describe items frequently observed together. Support, confidence and lift help distinguish common products from combinations that occur more often than expected.
A possible application for independent retailers: Help independent shops consider shelf arrangements using aggregate basket patterns. This extension is not delivered by the supplied starter.
Encode anonymised transactions as item-presence rows without customer identifiers.
Mine frequent itemsets and derive rules with explicit support and confidence thresholds.
Inspect lift, transaction counts and rule stability on a later transaction period.
Show a small reviewed rule list with counts and no causal claims.
The supplied starter creates 800 synthetic binary-classification rows with ten numeric features. It makes a stratified train/test split, fits a scaled RandomForestClassifier pipeline and prints a classification report.
model = Pipeline(
steps=[
("scale", StandardScaler()),
("classifier", RandomForestClassifier(
n_estimators=250, random_state=RANDOM_STATE)),
]
)
model.fit(X_train, y_train)
predictions = model.predict(X_test)
print(classification_report(y_test, predictions))The source contains no transaction baskets, itemsets or association rules. Synthetic binary classification does not establish performance on the proposed application. The source report uses one split; it supplies no deployment or real-world validation.
Proposed extension: Help independent shops consider shelf arrangements using aggregate basket patterns.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.