Basket Pattern Analyzer

Basket Pattern Analyzer

Find frequent item combinations and directed association rules in supplied anonymous baskets. Every result includes observed transaction counts.

Descriptive sample relationships only: no causal inference, automatic recommendations or revenue prediction. Empty baskets are not representable in this CSV format.

CSV and analysis settings

Exactly two headers: transaction and item (either order). Each row is one item in a transaction. Empty items are errors; blank records are skipped. The denominator is the number of distinct IDs with at least one valid item.

Repeated transaction/item pairs count once. Case, leading zeroes and Unicode spelling remain exact; no Unicode normalization. A new file replaces the text and results.

Required count = max(minimum count, ceiling(transactions × support / 100)). Percentages accept up to two decimals. The rule limit stops the whole analysis; it does not keep only top rules.

1 MiB UTF-8 · 5,000 data rows · 2,000 transactions · 200 items · 20 distinct items/basket · 120 UTF-16 units/label. Hard bounds: 20,000 generated combinations, 10,000 frequent sets and one million work units.

Supply a CSV and run analysis. Input changes clear previous results.

Measure definitions and interpretation
Support
count(A ∪ B) / N, where N is the number of represented nonempty transactions. Itemset support uses its own occurrence count / N.
Confidence
count(A ∪ B) / count(A). Reversing the rule may change confidence.
Lift
confidence / support(B). A value of 1 describes the independence reference in this sample; it is not proof of independence.
Leverage
support(A ∪ B) − support(A) × support(B). Positive and negative differences are retained.
Conviction
(1 − support(B)) / (1 − confidence). Positive / 0 → infinite; 0 / 0 → undefined. Neither is silently replaced by 1.

The table rounds ratios to five decimals and percentages to three decimal places. Exports keep the original computed numbers. Small samples, multiple comparisons and biased collection can produce misleading patterns; these measures are descriptive.

Primary measure references

Reviewed 23 September 2026. The formulas are applied to observed counts; this tool does not import or export PMML.

Comments & questions

Basket Pattern Analyzer

Count which items appear together in the transaction baskets you supply. Repeated occurrences of an item within the same transaction count once. The analyzer finds complete frequent itemsets within your chosen size limit and generates directed rules with their actual counts and descriptive measures. These observations are not causal conclusions or predictions of purchases, recommendations or revenue.

Key features

  • Explicit transaction/item CSV schema and duplicate membership counts
  • Exact support counts for itemsets of one to four items
  • Directed rules with confidence, lift, leverage and conviction
  • Separate finite, infinite and undefined conviction results
  • Bounded, cancellable work with no silent partial success
  • Top co-occurrence graph and complete independent CSV/JSON exports

How to use

  1. Paste a CSV or select a UTF-8 file with transaction and item columns.
  2. Choose the delimiter, whitespace policy, minimum support/count and confidence.
  3. Set maximum itemset length and the hard rule limit, then run analysis.
  4. Inspect the denominator, duplicate count, itemsets, directed rules and bounded graph.
  5. Download all itemsets, all rules or the complete JSON; preview filters do not restrict exports.

Use cases

  • Explore anonymous items commonly present in the same sample basket.
  • Compare conditional frequencies in A→B and B→A directions.
  • Check a small labeled dataset against hand-counted association measures.

Frequently asked questions

What CSV shape is required?

Use exactly two columns named transaction and item; either order is accepted. Each row is one item membership in an anonymous transaction ID. Quoted commas and escaped quotes are supported, and you choose comma, semicolon or tab. Invalid quotes, ragged rows, empty labels and extra columns are errors. Physically blank records are ignored. Empty baskets cannot be represented; the denominator contains only transactions with at least one valid item.

How are duplicates and names treated?

The same item appearing repeatedly in one transaction is counted once and reported as a duplicate membership. Optional trimming removes surrounding whitespace before grouping. Case, Unicode spelling and leading zeroes remain distinct; no number conversion or Unicode normalization is applied. IDs and items are at most 120 UTF-16 units and cannot contain embedded controls, bidirectional control characters or unpaired surrogates.

Which itemsets and rules are included?

An itemset must meet both the percentage support threshold and minimum transaction count. Percentages allow two decimal places and boundaries use integer arithmetic. Within lengths 1–4, every observed qualifying itemset is retained. Each nonempty proper partition generates a directed rule if its confidence meets the threshold. Maximum rules is a hard limit, not a top-N truncation. Excessive input or work rejects the whole result.

What do the measures mean, and why can conviction be undefined?

Support is the fraction of transactions containing both sides. Confidence conditions that count on the antecedent. Lift divides confidence by consequent support; leverage subtracts the independent-support product. Conviction divides one minus consequent support by one minus confidence. Positive/zero is marked infinite, while zero/zero is undefined. JSON uses null plus an explicit state for both; these are not missing observations.

What does the graph show?

It is an undirected co-occurrence view, not a recommendation or causality graph. Up to 12 frequent single items with the largest counts become numbered nodes. Up to 20 frequent pairs between those nodes are shown, ranked by count; width reflects pair support. Table filters and rule-confidence thresholds do not change it. With maximum length 1, no pairs are calculated. The tables and exports cover the complete configured scope.

What limits and export guarantees apply?

Input is at most 1 MiB and 5,000 data rows; there may be 2,000 nonempty transactions, 200 unique items and 20 items per basket. Generation stops at 20,000 distinct combinations, 10,000 frequent sets, the chosen rule cap (at most 5,000) or one million work units. Cancel and limit errors discard the whole report. All output rows are exported regardless of filtering or pagination. CSV uses UTF-8 BOM, quoted fields and CRLF; sets are JSON arrays. JSON retains full numeric precision and omits transaction IDs.

Privacy

Data stays in page memory and is not uploaded or saved automatically by this tool. Use anonymous transaction IDs. Selected file bytes are read only after selection; analysis and download occur on request. Reports contain item labels and aggregate counts but omit transaction IDs and raw CSV. Leaving the page removes unsaved work.

Related Tools

JSON ↔ CSVJSON FormatterText CleanerWasm Module InspectorHreflang Matrix CheckerAST Query PlaygroundContainer Build GraphDependency Graph ExplorerSemver Range LabCron Schedule AuditorPatch Review WorkbenchSource Map ExplorerLocalization Catalog AuditorStructured Data ReviewerHTTP Archive AnalyzerWebhook Signature LabProtobuf Schema WorkbenchGraphQL Schema LabAvro Schema EvolutionLocal SQL WorkbenchSchema Form BuilderMesh Repair WorkbenchPipe Network LabRobot Arm Kinematics LabThermal Network LabBeam Response LabGear Train DesignerTolerance Stackup LabSensor Calibration FitPCB Stackup PlannerDigital Filter DesignerNetwork Reachability MapSun Shadow MapGPS Error SimulatorDigital Logic SimulatorAnalog Circuit LabMechanism Linkage LabAnalysis Mesh GeneratorOpenAPI Contract InspectorDatabase Migration PlannerDimensional Equation CheckerTruss Force LabBoolean Minimization LabControl Response LabQueueing Simulation LabGeofence Event SimulatorCoordinate Reference LabSurvey Traverse LabRaster Classification LabChoropleth Design LabMap Print ComposerRaster Reprojection LabElevation Contour MakerTerrain Viewshed LabWatershed DelineatorMap Tile PackagerText File Encoding WorkbenchFilesystem Portability AuditorSBOM License ExplorerFile Signature Auditornpm Lockfile Conflict ResolverSource Secret AuditorOffline Web Package BuilderCertificate Chain InspectorTorrent Metainfo InspectorChunked File PackagerEncrypted File VaultDuplicate File FinderArchive WorkbenchDesign Token ManagerSpacing Token DesignerResponsive Type SystemPackaging Dieline DesignerSVG Icon Sprite PackerFlex Layout PlaygroundCSS Grid PlaygroundRegex Equivalence LabMarkdown Repository AuditorLog Template MinerResponsive Layout AuditorEmail Template PreviewInternal Link GraphState Machine TesterPetri Net SimulatorGit History VisualizerCurl Request WorkbenchBinary Protocol DesignerHex File EditorBinary Patch WorkbenchFile Signature WorkbenchAPI Mock SandboxSchema Column MapperEvent Log SessionizerER Diagram DesignerTime Series Gap AuditorStratified Data SplitterData Lineage DesignerDecision Tree LabData Anonymization WorkbenchData Expectation RunnerJSON Schema ValidatorRobots Policy TesterSEO HTML AuditorAccessibility Structure AuditorSyndication Feed WorkbenchIndexNow Payload BuilderCrawl Log AnalyzerCSP Policy WorkbenchSearch Performance AnalyzerCSV Formula Risk AuditorCORS Response SimulatorCache Header LabCookie Policy InspectorWeb Vitals Trace LabSitemap Health AuditorBatch File RenamerFile Manifest VerifierFolder Space MapFolder Difference ReviewerRoute Order OptimizerGeoJSON Map EditorPolygon Overlay LabCartographic Label PlacerSpatial Table JoinGeoJSON Topology AuditorGPX Track AnalyzerTrack Privacy RedactorCSV Table JoinCSV Pivot WorkbenchScientific Data ProfilerTabular Cleaning WorkbenchRecord ReconciliationData Dictionary BuilderCanonical Graph AuditorRedirect Plan TesterHTTP response and ping reference testBrowser and System InformationJSON ↔ YAML ConverterXML ↔ JSON ConverterHTML FormatterJavaScript MinifierMock Data Generator.gitignore GeneratorLicense GeneratorUser-Agent ParserPassword Strength CheckerCode to ImageXML FormatterHTTP Status Code LookupMIME Type LookupJS & SQL String EscapeCSS Box Shadow GeneratorCSS Gradient GeneratorIndent ConverterNumber Base ConverterUnicode Escape ConverterUnicode InspectorJSON Structure DiffMarkdown Table GeneratorBase64 EncoderURL EncoderSQL FormatterCron Expression GeneratorRegex TesterUUID GeneratorHash GeneratorTimestamp ConverterJWT DecoderHTML Entity ConverterMarkdown PreviewCSS MinifierMeta Tag GeneratorCase ConverterImage to Base64
Explore all Dev Tools tools →Image/Media →Text/Convert →Life/Fun →