# Reguły asocjacyjne i częste zbiory

EN: **Association rules and frequent itemsets** · id `associationrules` · aliases: market basket analysis, analiza koszykowa, frequent pattern mining

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Uczenie maszynowe](https://aiatlasgraph.com/t/ml.md) › [Uczenie nienadzorowane](https://aiatlasgraph.com/t/unsupervised.md) › Reguły asocjacyjne i częste zbiory

## Description

- PL: Eksploracja częstych zbiorów elementów i reguł X→Y w danych transakcyjnych, ocenianych wsparciem, ufnością i liftem.
- EN: Mining frequent itemsets and X→Y rules in transactional data, scored by support, confidence and lift.

## In one sentence

- PL: Szukanie rzeczy, które często występują razem, np. produktów kupowanych w jednym koszyku.
- EN: Finding things that often appear together, such as products bought in the same basket.

## Problem it solves

- PL: W tysiącach transakcji nikt ręcznie nie dostrzeże, które produkty lub zdarzenia regularnie idą w parze.
- EN: Across thousands of transactions, nobody can spot by hand which products or events regularly go together.

## What it does

- PL: Liczy, jak często zestawy rzeczy pojawiają się razem, i układa reguły typu „kto bierze to, zwykle bierze też tamto”.
- EN: It counts how often sets of items show up together and builds rules like “whoever takes this usually takes that too”.

## Everyday example

- PL: Supermarket zauważa, że klienci kupujący makaron często biorą sos, i stawia je obok siebie na półce.
- EN: A supermarket notices that shoppers buying pasta often take sauce, and shelves them side by side.

## This concerns you if you…

- PL: masz dane o koszykach, zamówieniach lub zestawach zdarzeń
- PL: szukasz pomysłów na pakiety lub rozmieszczenie produktów
- EN: have data on baskets, orders or sets of events
- EN: are looking for bundle or shelf-placement ideas

## Keywords

Apriori · FP-Growth · Eclat · support · confidence · lift · mlxtend · market basket analysis

## How it works

- PL: Algorytmy Apriori i FP-Growth wyszukują zbiory elementów o wsparciu powyżej progu; Apriori odcina kandydatów, których podzbiory nie są częste, a FP-Growth kompresuje transakcje do drzewa prefiksowego. Z częstych zbiorów generuje się reguły filtrowane ufnością i liftem.
- EN: Apriori and FP-Growth find itemsets whose support exceeds a threshold; Apriori prunes candidates with infrequent subsets, while FP-Growth compresses transactions into a prefix tree. Rules generated from frequent itemsets are filtered by confidence and lift.

## Limits

- PL: Przy niskim progu wsparcia liczba reguł eksploduje, a większość jest oczywista lub przypadkowa. Reguły pokazują współwystępowanie, nie przyczynę. Rzadkie, ale ważne kombinacje łatwo przeoczyć.
- EN: With a low support threshold, rule counts explode and most are obvious or accidental. Rules show co-occurrence, not cause. Rare but important combinations are easily missed.

## Key terms

- PL: **wsparcie**: Odsetek transakcji zawierających dany zestaw.
- PL: **ufność**: Jak często reguła się sprawdza, gdy pojawia się jej lewa strona.
- PL: **lift**: Ile razy częściej rzeczy występują razem, niż wynikałoby z przypadku.
- EN: **support**: The share of transactions containing a given set.
- EN: **confidence**: How often a rule holds when its left-hand side appears.
- EN: **lift**: How much more often items occur together than chance would predict.

## Know first

- [Statystyka i niepewność (Statistics and uncertainty)](https://aiatlasgraph.com/t/probability.md)

## Related topics

Untyped, symmetric "see also" links.

- [Systemy rekomendacyjne (Recommendation systems)](https://aiatlasgraph.com/t/recommenders.md)

## Sources

- [Politecnico di Torino (DBDMG) — Lab 07: Frequent Pattern Mining (lab handout)](<https://dbdmg.polito.it/dbdmg_web/wp-content/uploads/2025/11/DS_MLL_Lab_07__Frequent_Pattern_Mining_.pdf>) `polito-fpm-lab-2025` · by DBDMG, Politecnico di Torino
- [Fast Algorithms for Mining Association Rules](<https://www.vldb.org/conf/1994/P487.PDF>) `agrawal-srikant-apriori-1994` · by Rakesh Agrawal, Ramakrishnan Srikant
- [Mining Frequent Patterns without Candidate Generation](<https://www.cs.sfu.ca/~jpei/publications/sigmod00.pdf>) `han-pei-yin-fpgrowth-2000` · by Jiawei Han, Jian Pei, Yiwen Yin

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/associationrules · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
