Prepare the data
Use anonymised item baskets with transaction dates and clear handling of returns.
Explore what sells together. Check whether it persists.
Basket analysis studies co-purchases at transaction level. Seasonal promotions and common items can produce patterns that do not generalise to future shopping periods.
Learning concept · Not a validated service
Basket analysis studies co-purchases at transaction level. Seasonal promotions and common items can produce patterns that do not generalise to future shopping periods.
A possible application for shop owners: Help shop owners review shelf placement and optional bundles from aggregate sales patterns. This extension is not delivered by the supplied starter.
Use anonymised item baskets with transaction dates and clear handling of returns.
Mine itemsets and display support, confidence and lift with transaction counts.
Validate rules on a later period and compare promoted and non-promoted weeks.
Provide a merchandising review report rather than automatic bundle or pricing changes.
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 has numeric classification rows, not baskets or co-purchase 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 shop owners review shelf placement and optional bundles from aggregate sales 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.