---
title: "Association mining on varied data types"
subject: "Data Mining"
chapter: 4
key: "semester_7/data_mining:assoc-categorical-sequential-stream"
source: https://www.bctengineer.com/q/semester_7/data_mining/assoc-categorical-sequential-stream
site: BCT Engineering
---

# Association mining on varied data types

Data Mining · Chapter 4: Association Analysis

- Asked in: year not given
- Video: [#12 Mining Various Kinds Of Association Rules |DM|](https://www.youtube.com/watch?v=c9ph3S-bymQ) — Trouble- Free
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/data_mining/assoc-categorical-sequential-stream
- Whole chapter: https://www.bctengineer.com/md/semester_7/data_mining/chapter-4

## Question

How can we handle categorical, sequential, graphical and data stream using association mining?

## Short answer

Categorical: convert attribute-value pairs to binary items. Sequential: GSP or PrefixSpan with time constraints. Graph: frequent subgraph mining via gSpan or FSG with canonical labels. Stream: one-pass lossy counting and sliding windows, approximate counts.

## Answer

#### Categorical data
Convert each (attribute, value) pair into a binary item (continuous attributes are first discretized), then apply the usual Apriori or FP-growth. *Example*: (Gender = Male), (Age = 20-30), (Education = BE). Care is needed for attributes with many values (group rare values, use concept hierarchies for multilevel rules) and for skewed values; items from the same attribute should not be combined in one candidate.

#### Sequential data
Mine **sequential patterns**: a sequence is an ordered list of itemsets (e.g. a customer's purchases over time). A sequence is frequent if it is contained as a subsequence in at least min_sup data sequences. Apriori-like methods: **GSP** (generate candidate sequences level by level, using the property that every subsequence of a frequent sequence is frequent), **SPADE**, and pattern-growth **PrefixSpan**. Time constraints (min/max gap, window size) can be added.

#### Graph (graphical) data
Mine **frequent sub-graphs**: a sub-graph is frequent if it occurs in at least min_sup of the graphs. Candidates are grown by adding an edge or a vertex (Apriori-based FSG, or pattern-growth gSpan); subgraph isomorphism and canonical labelling are used to avoid duplicates. Example: common substructures in chemical compounds.

#### Data streams
Streams are continuous, fast and cannot be stored or scanned many times, so only **one-pass, approximate** algorithms are used:
- **Lossy counting**: keep counts with an allowed error ε; items with count below ε·N are dropped periodically.
- **Sticky sampling** and **Misra-Gries/Space-saving** keep only the most frequent items.
- **Sliding window** or time-decayed models give more weight to recent data.
- FP-stream, an FP-tree variant that keeps tilted time windows.

In all cases, the data is first converted to a form where itemsets, sequences or graphs can be counted, and the Apriori principle is used to prune.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How can categorical data be mined using association mining?
   A. Convert (attribute, value) pairs into binary items, then use Apriori or FP-growth
   B. Compute the mean of each attribute
   C. Use K-means first
   D. Remove the attributes
   Answer: A. Binary items allow standard algorithms. (Key point: Categorical)

2. Which is a sequential pattern mining algorithm?
   A. FSG
   B. GSP, SPADE or PrefixSpan
   C. Lossy counting
   D. DHP
   Answer: B. GSP, SPADE and PrefixSpan mine frequent subsequences. (Key point: Sequential)

3. How are candidate subgraphs grown?
   A. By removing edges from the full graph
   B. By clustering vertices
   C. By adding an edge or vertex, using isomorphism checks to avoid duplicates
   D. By counting item pairs
   Answer: C. FSG and gSpan extend subgraphs and test canonical labels. (Key point: Graph)

4. Why are one-pass approximate algorithms used for data streams?
   A. Streams are always small
   B. Streams contain no repeated items
   C. Exact answers are always cheap
   D. Streams are continuous and fast and cannot be stored or scanned many times
   Answer: D. Lossy counting and sticky sampling work in one pass with bounded error. (Key point: Streams)

## Related in Data Mining

- [Categorical data; sequential, sub-graph patterns](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Acategorical-sequential-subgraph-patterns) — Data Mining, chapter 4
- [Data mining and its applications](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Adm-banking-biomedical) — Data Mining, chapter 1
- [Data mining vs DW and applications](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Adm-vs-dw-applications) — Data Mining, chapter 1
- [CRM; security and privacy of data mining](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Acrm-security-privacy) — Data Mining, chapter 7
- [Where data mining is applicable](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Adm-areas-applicable) — Data Mining, chapter 1
- [Descriptive vs predictive data mining](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Adm-descriptive-predictive) — Data Mining, chapter 1

## Related in other subjects

- [Stream flow from current meter data](https://www.bctengineer.com/question.md?key=semester_5%2Fengineering_hydrology%3Acurrent-meter-0-035-0-74n) — Engineering Hydrology, chapter 4, asked 2×
- [Discharge from current meter at 0.6d, stream gauging data](https://www.bctengineer.com/question.md?key=semester_5%2Fengineering_hydrology%3Acurrent-meter-0-32n-0-032-2) — Engineering Hydrology, chapter 4
- [Discharge of Jhiku khola from stream gauging data](https://www.bctengineer.com/question.md?key=semester_5%2Fengineering_hydrology%3Acurrent-meter-jhiku-khola) — Engineering Hydrology, chapter 4
- [Data warehouse and data mining](https://www.bctengineer.com/question.md?key=semester_8%2Finformation_system%3Adata-warehouse-data-mining) — Information System, chapter 4, asked 2×
