2020 question paper

Data Mining

26 questions

  1. Q1a. The full form of KDD is (i) knowledge database (ii) knowledge discovery in databases (iii) knowledge data division (iv) knowledge data definition20202m

    Module 2: Data Mining and Association Rule Mining

    The full form of KDD is

    (i) knowledge database
    (ii) knowledge discovery in databases
    (iii) knowledge data division
    (iv) knowledge data definition

    View this question on its own page →
    Worked Solution

    Answer: (ii) knowledge discovery in databases

    KDD stands for Knowledge Discovery in Databases — the overall, multi-step process of turning raw data into useful, actionable knowledge. Data mining is technically just one step within KDD (the pattern-extraction step), while KDD as a whole covers:

    Data ─▶ Selection ─▶ Preprocessing ─▶ Transformation ─▶ Data Mining ─▶ Interpretation/Evaluation ─▶ Knowledge
    

    People often use "data mining" and "KDD" interchangeably in casual usage, but formally, data mining is embedded inside the broader KDD pipeline.

  2. Q1b. You are given data about seismic activity in Japan, and you want to predict a magnitude of the next earthquake, this is an example of (i) supervised learning (ii) unsupervised learning (iii) serration (iv) dimensionality reduction20202m

    Module 3: Classification and Prediction

    You are given data about seismic activity in Japan, and you want to predict a magnitude of the next earthquake, this is an example of

    (i) supervised learning
    (ii) unsupervised learning
    (iii) serration
    (iv) dimensionality reduction

    View this question on its own page →
  3. Q1c. Which of the following does not involve in data mining? (i) Knowledge extraction (ii) Data archaeology (iii) Data exploration (iv) Data transformation20202m

    Module 2: Data Mining and Association Rule Mining

    Which of the following does not involve in data mining?

    (i) Knowledge extraction
    (ii) Data archaeology
    (iii) Data exploration
    (iv) Data transformation

    View this question on its own page →
    Worked Solution

    Answer: (iv) Data transformation

    Data mining is historically also known by several near-synonyms:

    • Knowledge extraction (extracting patterns/knowledge from data)
    • Data archaeology (digging through historical data for insight)
    • Data exploration (exploratory analysis of a dataset)

    All three of these describe the act of mining itself. Data transformation, however, is a preprocessing step (converting/normalizing data into a suitable form) that happens before mining — it's not itself a synonym for or activity that defines data mining, making it the odd one out.

  4. Q1d. _______ is a comparison of the general features of the target class data objects against the general features of objects from one or multiple contrasting classes. (i) Data characterization (ii) Data classification (iii) Data discrimination (iv) Data selection20202m

    Module 2: Data Mining and Association Rule Mining

    _______ is a comparison of the general features of the target class data objects against the general features of objects from one or multiple contrasting classes.

    (i) Data characterization
    (ii) Data classification
    (iii) Data discrimination
    (iv) Data selection

    View this question on its own page →
    Worked Solution

    Answer: (iii) Data discrimination

    • Data characterization summarizes the general features of a single target class (e.g., "typical profile of high-spending customers").
    • Data discrimination compares the target class against one or more contrasting classes, highlighting the differences (e.g., "how do high-spending customers differ from low-spending customers?").

    Since the question explicitly describes a comparison against contrasting classes, the answer is data discrimination, not characterization (which looks at only one class in isolation).

  5. Q1e. Bayesian classifiers is (i) a class of learning algorithm that tries to find an optimum classification of a set of examples using the probabilistic theory (ii) any mechanism employed by a learning system to constrain the search space of a hypothesis (iii) an approach to the design of learning algorithms that is inspired by the fact that when people encounter new situations, they often explain them by reference to familiar experiences, adapting the explanations to fit the new situation (iv) None of the above20202m

    Module 3: Classification and Prediction

    Bayesian classifiers is

    (i) a class of learning algorithm that tries to find an optimum classification of a set of examples using the probabilistic theory
    (ii) any mechanism employed by a learning system to constrain the search space of a hypothesis
    (iii) an approach to the design of learning algorithms that is inspired by the fact that when people encounter new situations, they often explain them by reference to familiar experiences, adapting the explanations to fit the new situation
    (iv) None of the above

    View this question on its own page →
  6. Q1f. The output of KDD is (i) data (ii) information (iii) query (iv) useful information20202m

    Module 2: Data Mining and Association Rule Mining

    The output of KDD is

    (i) data
    (ii) information
    (iii) query
    (iv) useful information

    View this question on its own page →
    Worked Solution

    Answer: (iv) useful information

    KDD's whole purpose is to convert raw data into useful, actionable knowledge/information through a pipeline of selection, preprocessing, transformation, mining, and interpretation:

    Raw Data ──KDD process──▶ Useful, actionable Information (patterns, rules, insights)
    

    Simply "data" (i) or a bare "query" (iii) is not the output of the process — those are inputs/tools. Generic "information" (ii) is too broad; the defining goal of KDD is specifically useful information that supports decision-making, which is why (iv) is the precise answer.

  7. Q1g. Cluster is (i) group of similar objects that differ significantly from other objects (ii) operations on a database to transform or simplify data in order to prepare it for a machine learning algorithm (iii) symbolic representation of facts or ideas from which information can potentially be extracted (iv) None of the above20202m

    Module 4: Cluster Analysis

    Cluster is

    (i) group of similar objects that differ significantly from other objects
    (ii) operations on a database to transform or simplify data in order to prepare it for a machine learning algorithm
    (iii) symbolic representation of facts or ideas from which information can potentially be extracted
    (iv) None of the above

    View this question on its own page →
  8. Q1h. Background knowledge referred to (i) additional acquaintance used by a learning algorithm to facilitate the learning process (ii) a neural network that makes use of a hidden layer (iii) it is a form of automatic learning (iv) None of the above20202m

    Module 2: Data Mining and Association Rule Mining

    Background knowledge referred to

    (i) additional acquaintance used by a learning algorithm to facilitate the learning process
    (ii) a neural network that makes use of a hidden layer
    (iii) it is a form of automatic learning
    (iv) None of the above

    View this question on its own page →
    Worked Solution

    Answer: (i) additional acquaintance used by a learning algorithm to facilitate the learning process

    Background knowledge refers to prior/domain knowledge (concept hierarchies, known constraints, expert rules, etc.) that is supplied to a learning/mining algorithm in addition to the raw training data, to guide and improve the learning process — e.g., helping generalize concepts, constrain hypothesis search, or interpret discovered patterns more meaningfully.

    It is not itself a specific architecture like a hidden-layer neural network (ii), nor a synonym for "automatic learning" in general (iii) — it's specifically the extra contextual information fed into a learning system.

  9. Q1i. Case-based learning is (i) a class of learning algorithm that tries to find an optimum classification of a set of examples using the probabilistic theory (ii) any mechanism employed by a learning system to constrain the search space of a hypothesis (iii) an approach to the design of learning algorithms that is inspired by the fact that when people encounter new situations, they often explain them by reference to familiar experiences, adapting the explanations to fit the new situation (iv) None of the above20202m

    Module 3: Classification and Prediction

    Case-based learning is

    (i) a class of learning algorithm that tries to find an optimum classification of a set of examples using the probabilistic theory
    (ii) any mechanism employed by a learning system to constrain the search space of a hypothesis
    (iii) an approach to the design of learning algorithms that is inspired by the fact that when people encounter new situations, they often explain them by reference to familiar experiences, adapting the explanations to fit the new situation
    (iv) None of the above

    View this question on its own page →
  10. Q1j. Some telecommunication companies want to segment their customers into distinct groups in order to send appropriate subscription offers. This is an example of (i) supervised learning (ii) data extraction (iii) serration (iv) unsupervised learning20202m

    Module 4: Cluster Analysis

    Some telecommunication companies want to segment their customers into distinct groups in order to send appropriate subscription offers. This is an example of

    (i) supervised learning
    (ii) data extraction
    (iii) serration
    (iv) unsupervised learning

    View this question on its own page →
  11. Q2a. Compare and contrast data warehouse system and operational database system.20207m

    Module 1: Data Warehousing and Business Analysis

    Compare and contrast data warehouse system and operational database system.

    View this question on its own page →
    Worked Solution

    Data Warehouse vs Operational Database (OLTP)

    Feature Operational DB (OLTP) Data Warehouse (OLAP)
    Purpose Day-to-day transaction processing Analysis, decision support
    Users Clerks, DBAs, front-line staff Managers, analysts, executives
    Data content Current, detailed data Historical, summarized, consolidated data
    Data model Normalized (E-R model), application-oriented Denormalized — star/snowflake schema, subject-oriented
    Access pattern Short, atomic transactions (read/write/update) Complex queries, mostly read-only, large scans
    Operations Insert, update, delete (many small txns) Aggregate, drill-down, roll-up (few large queries)
    Design goal High concurrency, fast single-record access Fast aggregation over large volumes
    Data volume per query Small Large
    Time orientation Reflects current value Reflects data over time (historical snapshots)
    Redundancy Minimized (normalization) Encouraged (denormalization for query speed)
    Backup/recovery Critical, transaction-consistent Less frequent, can be reloaded from source

    Conceptual Diagram

     OLTP Systems                     Data Warehouse
     ┌───────────┐   ETL (Extract,   ┌────────────────┐
     │ Sales DB  │──Transform,Load──▶│                │
     ├───────────┤                   │  Subject-      │
     │ HR DB     │──────────────────▶│  oriented,     │──▶ OLAP / Reports
     ├───────────┤                   │  integrated,   │
     │ Inventory │──────────────────▶│  time-variant, │
     │ DB        │                   │  non-volatile  │
     └───────────┘                   └────────────────┘
       (many small,                    (one large,
       normalized DBs)                  denormalized store)
    

    In short: OLTP is built for doing the business (fast writes, current data), a Data Warehouse is built for understanding the business (fast reads, historical/aggregated data). Bill Inmon defines the DW as subject-oriented, integrated, time-variant, and non-volatile — all properties an OLTP system deliberately does not have.

  12. Q2b. Describe the steps involved in data mining when viewed as a process of knowledge discovery.20207m

    Module 2: Data Mining and Association Rule Mining

    Describe the steps involved in data mining when viewed as a process of knowledge discovery.

    View this question on its own page →
    Worked Solution

    Data Mining as Knowledge Discovery — Steps

    Data mining, viewed within the KDD (Knowledge Discovery in Databases) framework, involves the following iterative steps:

    Raw Data
       │
       ▼
    1. Data Cleaning ───────────▶ remove noise, inconsistent data
       │
       ▼
    2. Data Integration ────────▶ combine multiple data sources
       │
       ▼
    3. Data Selection ──────────▶ retrieve data relevant to the task
       │
       ▼
    4. Data Transformation ─────▶ consolidate into forms suitable for mining
       │                           (aggregation, normalization)
       ▼
    5. Data Mining ─────────────▶ apply algorithms to extract patterns
       │                           (classification, clustering, association)
       ▼
    6. Pattern Evaluation ──────▶ identify truly interesting patterns
       │                           using interestingness measures
       ▼
    7. Knowledge Presentation ──▶ visualize/present mined knowledge
       │                           (reports, graphs, rules)
       ▼
    Useful Knowledge
    

    Step-by-step explanation

    1. Data Cleaning — removes noise and inconsistent/incomplete data.
    2. Data Integration — merges data from multiple heterogeneous sources into one coherent store.
    3. Data Selection — retrieves only the data relevant to the analysis task at hand.
    4. Data Transformation — converts/consolidates data into forms appropriate for mining (e.g., aggregation, normalization, discretization).
    5. Data Mining — the essential step where intelligent methods (classification, clustering, association rule mining, etc.) are applied to extract data patterns.
    6. Pattern Evaluation — identifies truly interesting patterns representing knowledge, based on interestingness measures (support, confidence, novelty).
    7. Knowledge Presentation — visualization and knowledge representation techniques present the mined knowledge to users in an understandable form.

    Steps 1–4 together are often called preprocessing, and this whole pipeline is typically iterative — insights from later steps may send you back to refine earlier ones (e.g., pattern evaluation might reveal that different data selection is needed).

  13. Q3a. What is data warehouse backend process? Explain briefly.20207m

    Module 1: Data Warehousing and Business Analysis

    What is data warehouse backend process? Explain briefly.

    View this question on its own page →
    Worked Solution

    Data Warehouse Backend Process

    The backend process is the pipeline that moves data from scattered operational sources into the clean, integrated warehouse. It runs "behind the scenes," invisible to end users, and is commonly called ETL (Extract–Transform–Load).

     Operational      ┌─────────┐      ┌───────────┐      ┌────────┐      ┌───────────┐
     Source Systems ─▶│ Extract  │─────▶│ Clean/     │─────▶│Transform│─────▶│  Load      │──▶ Data
     (RDBMS, files,   │          │      │ Scrub      │      │        │      │  (+Refresh)│    Warehouse
      ERP, legacy)     └─────────┘      └───────────┘      └────────┘      └───────────┘
    

    Steps

    1. Extraction — Data is pulled from multiple heterogeneous source systems (databases, flat files, ERP/CRM, external feeds).
    2. Cleaning (Scrubbing) — Detects and corrects errors, inconsistencies, missing values, and duplicate records to improve data quality.
    3. Transformation — Converts data into the warehouse's standard format: normalizing units, renaming fields, applying business rules, aggregating, and generating derived/summary values.
    4. Integration — Merges data from different sources into a unified, subject-oriented schema, resolving naming and structural conflicts (schema/semantic integration).
    5. Loading — Writes the cleaned, transformed, integrated data into the warehouse's fact and dimension tables, often in bulk/batch mode.
    6. Refreshing — Periodically propagates updates from the source systems into the warehouse (full refresh or incremental refresh) to keep it current.

    Why it matters

    The backend process is what actually enforces the warehouse's defining properties — integrated (step 4), non-volatile (loaded once, not transaction-updated), and time-variant (refresh keeps historical snapshots) — turning raw, messy operational data into a trustworthy analytical resource.

  14. Q3b. Explain different OLAP operations.20207m

    Module 1: Data Warehousing and Business Analysis

    Explain different OLAP operations.

    View this question on its own page →
    Worked Solution

    OLAP Operations

    OLAP tools let users navigate a multidimensional data cube through five core operations:

    1. Roll-up (Drill-up)

    Aggregates data by climbing up a concept hierarchy or reducing dimensions.

    Day → Month → Quarter → Year        (climbing the Time hierarchy)
    

    Example: Sales by City → Sales by State → Sales by Country.

    2. Drill-down

    The reverse of roll-up — moves down the hierarchy to reveal finer detail.

    Year → Quarter → Month → Day
    

    Example: Yearly sales → Quarterly sales → Monthly sales.

    3. Slice

    Selects a single value on one dimension, producing a lower-dimensional sub-cube.

    Cube(Time, Product, Region) --Time="2024"--> Table(Product, Region)
    

    4. Dice

    Selects a sub-cube by specifying ranges/values on two or more dimensions.

    Dice: Time∈{2023,2024}, Region="West" → smaller cube
    

    5. Pivot (Rotate)

    Rotates the data axes to provide an alternate presentation — e.g., swapping rows and columns in a cross-tab.

    Before:                 After pivot:
            Q1  Q2  Q3            Prod A  Prod B
    Prod A  10  20  15    ──▶  Q1   10      12
    Prod B  12  18  22          Q2   20      18
                                 Q3   15      22
    

    Summary Table

    Operation Effect Dimensionality change
    Roll-up Aggregate, coarsen granularity Decreases (or stays, fewer dims)
    Drill-down Disaggregate, finer granularity Increases
    Slice Fix one dimension's value Decreases by 1
    Dice Restrict 2+ dimensions Same dims, smaller sub-cube
    Pivot Re-orient axes for viewing Unchanged

    These operations give analysts an interactive way to explore a cube from summary to detail and back, without re-running queries against the raw source data.

  15. Q4a. What is data cleaning? Describe various approaches for cleaning data having missing values.20205m

    Module 2: Data Mining and Association Rule Mining

    What is data cleaning? Describe various approaches for cleaning data having missing values.

    View this question on its own page →
    Worked Solution

    Data Cleaning & Approaches for Missing Values

    What is Data Cleaning?

    Data cleaning (data cleansing/scrubbing) is the preprocessing step that detects and corrects (or removes) inaccurate, incomplete, inconsistent, or noisy data from a dataset — filling missing values, smoothing noise, identifying/handling outliers, and resolving inconsistencies — so that mining algorithms operate on trustworthy, high-quality data.

    Approaches for Handling Missing Values

    1. Ignore the tuple
      Discard the entire record. Only reasonable when the missing attribute is essential (e.g., the class label) and the dataset is large enough to absorb the loss.

    2. Fill in manually
      A domain expert inspects and enters the correct value. Accurate but time-consuming and infeasible for large datasets.

    3. Use a global constant
      Replace all missing entries with a fixed placeholder (e.g., "Unknown", -999). Simple but risky — the mining algorithm may misinterpret the placeholder as a meaningful pattern.

    4. Use the attribute mean/median
      Fill numeric gaps with the mean (or median, for skewed distributions) of that attribute computed over all available tuples.

    5. Use the mean/median for the same class
      More accurate than a global mean — uses the mean of tuples belonging to the same class as the one with the missing value.

    6. Use the most probable value
      Predict the missing value using inference-based methods: regression, Bayesian formalism, or decision-tree induction based on other attributes. This is the most sophisticated and generally most accurate method, since it uses the relationships already present in the data.

                    Missing Value Handling
                            │
       ┌─────────┬──────────┼──────────┬────────────┬───────────┐
    Ignore    Manual     Global     Attribute    Class-wise   Predicted
    tuple      fill      constant   mean/median  mean/median  (regression/
                                                                Bayes/tree)
    

    In practice, methods 4–6 (statistical/model-based imputation) are most commonly used in real mining pipelines because they preserve dataset size while introducing minimal bias, compared to simply dropping records.

  16. Q4b. Use the two methods below to normalize the following group of data: 200; 300; 400; 600; 1000 * min-max normalization by setting min = 0 and max = 1 * z-score normalization20205m

    Module 2: Data Mining and Association Rule Mining

    Use the two methods below to normalize the following group of data:

    200; 300; 400; 600; 1000

    • min-max normalization by setting min = 0 and max = 1
    • z-score normalization
    View this question on its own page →
    Worked Solution

    Normalizing Data: 200, 300, 400, 600, 1000

    Method 1: Min-Max Normalization (new_min=0, new_max=1)

    v=vminmaxmin×(new_maxnew_min)+new_minv' = \frac{v - min}{max - min} \times (\text{new\_max} - \text{new\_min}) + \text{new\_min}

    Here min=200min = 200, max=1000max = 1000, range =800= 800, new_min=0, new_max=1, so simply:
    v=v200800v' = \frac{v - 200}{800}

    v Calculation v'
    200 (200-200)/800 0.000
    300 (300-200)/800 0.125
    400 (400-200)/800 0.250
    600 (600-200)/800 0.500
    1000 (1000-200)/800 1.000

    Method 2: Z-Score Normalization

    v=vμσv' = \frac{v - \mu}{\sigma}

    Mean: μ=200+300+400+600+10005=25005=500\mu = \dfrac{200+300+400+600+1000}{5} = \dfrac{2500}{5} = 500

    Variance (population):
    σ2=(200500)2+(300500)2+(400500)2+(600500)2+(1000500)25\sigma^2 = \frac{(200-500)^2+(300-500)^2+(400-500)^2+(600-500)^2+(1000-500)^2}{5}
    =90000+40000+10000+10000+2500005=4000005=80000= \frac{90000+40000+10000+10000+250000}{5} = \frac{400000}{5} = 80000

    Std dev: σ=80000282.84\sigma = \sqrt{80000} \approx 282.84

    v v − μ z = (v−μ)/σ
    200 −300 −1.06
    300 −200 −0.71
    400 −100 −0.35
    600 +100 +0.35
    1000 +500 +1.77

    Summary

    Original Min-Max [0,1] Z-Score
    200 0.000 −1.06
    300 0.125 −0.71
    400 0.250 −0.35
    600 0.500 +0.35
    1000 1.000 +1.77

    Min-max squeezes everything cleanly into [0,1] (bounded by the observed extremes), while z-score centers the data at 0 with unit spread — the value 1000, being furthest from the mean, gets the largest magnitude z-score (+1.77), reflecting how much of an outlier it is relative to the rest of the group.

  17. Q4c. What is the value range of the following normalization methods? * min-max normalization * z-score normalization * normalization by decimal scaling20204m

    Module 2: Data Mining and Association Rule Mining

    What is the value range of the following normalization methods?

    • min-max normalization
    • z-score normalization
    • normalization by decimal scaling
    View this question on its own page →
    Worked Solution

    Value Ranges of Normalization Methods

    Method Formula Value Range
    Min-Max Normalization v=vminmaxmin(new_maxnew_min)+new_minv' = \dfrac{v-min}{max-min}(\text{new\_max}-\text{new\_min}) + \text{new\_min} Bounded exactly to [new_min, new_max] (commonly [0,1])
    Z-Score Normalization v=vμσv' = \dfrac{v-\mu}{\sigma} Unbounded in theory; in practice typically falls roughly in [−3, +3] for approximately normal data
    Decimal Scaling v=v10jv' = \dfrac{v}{10^j}, where jj is the smallest integer such that max(v)<1\max(|v'|) < 1 Bounded to (−1, 1)

    Notes

    • Min-max preserves the exact relationships in the original data and gives a strictly bounded range — but it's sensitive to outliers (a single extreme value stretches/compresses everything else).
    • Z-score has no hard bounds since it depends on how far a value is from the mean in standard-deviation units — extreme outliers can produce large |z| values well beyond ±3.
    • Decimal scaling normalizes by moving the decimal point, controlled by the maximum absolute value in the data, guaranteeing the result always lies strictly between −1 and 1.
    Min-Max:        [0 ──────────── 1]        (fixed, bounded)
    Z-Score:      (-∞ ...  -3  0  +3  ... +∞)  (unbounded, ~[-3,3] typical)
    Decimal Scale:   (-1 ──────── 1)           (bounded, data-dependent)
    
  18. Q5a. Write and explain pseudocode for a priori algorithm. Explain the terms: (i) support count; (ii) confidence.20206m

    Module 2: Data Mining and Association Rule Mining

    Write and explain pseudocode for a priori algorithm. Explain the terms:

    (i) support count;
    (ii) confidence.

    View this question on its own page →
    Worked Solution

    Apriori Algorithm — Pseudocode & Key Terms

    Pseudocode

    Algorithm Apriori(D, min_sup):
        Input:  D = transaction database, min_sup = minimum support threshold
        Output: L = all frequent itemsets in D
    
        L1 = {frequent 1-itemsets found by scanning D}
        k = 2
        while (L(k-1) is not empty):
            Ck = apriori_gen(L(k-1))          // candidate generation
            for each transaction t in D:
                Ct = subset(Ck, t)             // candidates contained in t
                for each candidate c in Ct:
                    c.count++
            Lk = { c in Ck | c.count >= min_sup }
            L = L ∪ Lk
            k = k + 1
        return L
    
    Function apriori_gen(L(k-1)):
        Ck = ∅
        // Join step: join L(k-1) with itself
        for each pair (p, q) in L(k-1) x L(k-1):
            if p and q share the first (k-2) items:
                c = p ∪ {last item of q}
                // Prune step: remove candidates with an infrequent subset
                if all (k-1)-subsets of c are in L(k-1):
                    Ck = Ck ∪ {c}
        return Ck
    

    Explanation

    1. First pass: count individual items to find frequent 1-itemsets (L1).
    2. Iterative passes: for k = 2, 3, ..., generate candidate k-itemsets (Ck) by joining frequent (k-1)-itemsets that share a common (k-2)-item prefix.
    3. Prune step: discard any candidate whose any (k-1)-subset is not frequent (using the apriori property: all subsets of a frequent itemset must be frequent).
    4. Count & filter: scan the database, count support for surviving candidates, keep only those meeting min_sup → Lk.
    5. Repeat until no new frequent itemsets are found.

    Key Terms

    (i) Support Count
    The number of transactions in the database that contain a given itemset:
    support_count(X)={tD:Xt}support\_count(X) = |\{t \in D : X \subseteq t\}|
    Support (as a fraction) = support_count / |D|. It measures how frequently an itemset appears.

    (ii) Confidence
    For a rule ABA \Rightarrow B, confidence measures how reliably B follows when A is present:
    confidence(AB)=support_count(AB)support_count(A)confidence(A \Rightarrow B) = \frac{support\_count(A \cup B)}{support\_count(A)}
    It is the conditional probability P(BA)P(B \mid A) — the fraction of transactions containing A that also contain B.

    Support: "How often does this itemset occur overall?"
    Confidence: "Given the antecedent occurred, how often does the consequent follow?"
    
  19. Q5b. Consider a database D, consisting of 15 transactions. Suppose minimum support count is 2 (i.e., min_sup = 20%) and minimum confidence required is 70%. Find out the frequent item set using a priori algorithm. Explain each step with diagram: | A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | |:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |20208m

    Module 2: Data Mining and Association Rule Mining

    Consider a database D, consisting of 15 transactions. Suppose minimum support count is 2 (i.e., min_sup = 20%) and minimum confidence required is 70%. Find out the frequent item set using a priori algorithm. Explain each step with diagram:

    A1 A2 A3 A4 A5 A6 A7 A8 A9
    1 0 0 0 1 1 0 1 0
    0 1 0 1 0 0 0 1 0
    0 0 0 1 1 0 1 0 0
    0 1 1 0 0 0 0 0 0
    0 0 0 0 1 1 1 0 0
    0 1 1 1 0 0 0 0 0
    0 1 0 0 0 1 1 0 1
    0 0 0 0 1 0 0 0 0
    0 0 0 0 0 0 0 1 0
    0 0 1 0 1 0 1 0 0
    0 0 1 0 1 0 1 0 0
    0 0 0 0 1 1 0 1 0
    0 1 0 1 0 1 1 0 0
    1 0 1 0 1 0 1 0 0
    0 1 1 0 0 0 0 0 1
    View this question on its own page →
    Worked Solution

    Apriori Algorithm — 15-Transaction Database (9 Binary Attributes)

    Given: min_sup count = 2, min_conf = 70%, database D of 15 transactions over items A1–A9.

    Step 1: Scan D → Count 1-itemsets (C1)

    Item Support count Frequent (≥2)?
    A1 2
    A2 6
    A3 6
    A4 4
    A5 8
    A6 5
    A7 7
    A8 4
    A9 2

    L1 = {A1, A2, A3, A4, A5, A6, A7, A8, A9} — every item clears the low min_sup=2 threshold.

    L1: [A1]─[A2]─[A3]─[A4]─[A5]─[A6]─[A7]─[A8]─[A9]
         2    6    6    4    8    5    7    4    2
    

    Step 2: Generate C2 (all pairs of L1), scan D, prune → L2

    Only pairs with support count ≥ 2 survive (out of the 36 possible pairs, most drop out):

    Pair Count Pair Count
    A1,A5 2 ✅ A4,A7 2 ✅
    A2,A3 3 ✅ A5,A6 3 ✅
    A2,A4 3 ✅ A5,A7 5 ✅
    A2,A6 2 ✅ A5,A8 2 ✅
    A2,A7 2 ✅ A6,A7 3 ✅
    A2,A9 2 ✅ A6,A8 2 ✅
    A3,A5 3 ✅
    A3,A7 3 ✅

    (All other 22 pairs, e.g. A1-A2, A1-A3, A2-A5, A3-A4, A4-A5, A7-A8, etc., had count ≤1 and were pruned.)

    L2 = {A1A5, A2A3, A2A4, A2A6, A2A7, A2A9, A3A5, A3A7, A4A7, A5A6, A5A7, A5A8, A6A7, A6A8} (14 itemsets)

            L1 (9 items) ──join+prune──▶ L2 (14 pairs, out of 36 possible)
    

    Step 3: Generate C3 via apriori-gen (join L2 with itself + prune using apriori property)

    Joining pairs sharing a common first item, keeping only candidates whose every 2-subset is in L2:

    Candidate 2-subsets check Valid? DB count Frequent?
    A2,A3,A7 A2A3✅ A2A7✅ A3A7✅ 0
    A2,A4,A7 A2A4✅ A2A7✅ A4A7✅ 1
    A2,A6,A7 A2A6✅ A2A7✅ A6A7✅ 2
    A3,A5,A7 A3A5✅ A3A7✅ A5A7✅ 3
    A5,A6,A7 A5A6✅ A5A7✅ A6A7✅ 1
    A5,A6,A8 A5A6✅ A5A8✅ A6A8✅ 2

    L3 = {A2A6A7(2), A3A5A7(3), A5A6A8(2)}

    Step 4: Try C4

    No two itemsets in L3 share a common 2-item prefix (A2A6A7, A3A5A7, A5A6A8 are all disjoint in their first two items) → no valid C4 candidates → algorithm terminates.

    Final Frequent Itemsets

    L1 (9):  A1 A2 A3 A4 A5 A6 A7 A8 A9
    L2 (14): A1A5  A2A3  A2A4  A2A6  A2A7  A2A9  A3A5
             A3A7  A4A7  A5A6  A5A7  A5A8  A6A7  A6A8
    L3 (3):  A2A6A7   A3A5A7   A5A6A8
    

    Total = 26 frequent itemsets

    Strong Rules Example (from the maximal itemset A3,A5,A7 — count 3)

    Confidence check for rules generated from {A3,A5,A7}:

    • A3,A5 ⇒ A7: conf = 3/support(A3A5)=3/3 = 100% ✅ strong
    • A3,A7 ⇒ A5: conf = 3/support(A3A7)=3/3 = 100% ✅ strong
    • A5,A7 ⇒ A3: conf = 3/support(A5A7)=3/5 = 60% ❌ below 70% threshold

    Only the first two rules meet min_conf = 70% and would be output as strong association rules.

  20. Q6. Draw decision tree for the following data sets. Use entropy as a node selection mechanism: | Outlook | Temp (F) | Humidity | Windy | Class | |:---|:---|:---|:---|:---| | Rainy | Hot | High | False | No | | Rainy | Hot | High | True | No | | Overcast | Hot | High | False | Yes | | Sunny | Mild | High | False | Yes | | Sunny | Cool | Normal | False | Yes | | Sunny | Cool | Normal | True | No | | Overcast | Cool | Normal | True | Yes | | Rainy | Mild | High | False | No | | Rainy | Cool | Normal | False | Yes | | Sunny | Mild | Normal | False | Yes | | Rainy | Mild | Normal | True | Yes | | Overcast | Mild | High | True | Yes | | Overcast | Hot | Normal | False | Yes | | Sunny | Mild | High | True | No |202014m

    Module 3: Classification and Prediction

    Draw decision tree for the following data sets. Use entropy as a node selection mechanism:

    Outlook Temp (F) Humidity Windy Class
    Rainy Hot High False No
    Rainy Hot High True No
    Overcast Hot High False Yes
    Sunny Mild High False Yes
    Sunny Cool Normal False Yes
    Sunny Cool Normal True No
    Overcast Cool Normal True Yes
    Rainy Mild High False No
    Rainy Cool Normal False Yes
    Sunny Mild Normal False Yes
    Rainy Mild Normal True Yes
    Overcast Mild High True Yes
    Overcast Hot Normal False Yes
    Sunny Mild High True No
    View this question on its own page →
  21. Q7a. What are the main requirements for cluster analysis?20207m

    Module 4: Cluster Analysis

    What are the main requirements for cluster analysis?

    View this question on its own page →
  22. Q7b. Explain different basic clustering methods.20207m

    Module 4: Cluster Analysis

    Explain different basic clustering methods.

    View this question on its own page →
  23. Q8a. What is multilevel association rule mining? Explain different approaches to do multilevel association rule mining.20207m

    Module 2: Data Mining and Association Rule Mining

    What is multilevel association rule mining? Explain different approaches to do multilevel association rule mining.

    View this question on its own page →
    Worked Solution

    Multilevel Association Rule Mining

    What is it?

    Multilevel association rule mining discovers association rules at multiple levels of abstraction, using a concept hierarchy over the items (e.g., Item → Subcategory → Category). Mining only at the lowest (raw item) level often misses valuable patterns, because individual items may be too specific to have high support, while their generalized categories do.

                    All Items
                    /        \
              Beverages      Bakery
              /      \        /    \
          Milk      Juice  Bread  Cookies
          /   \
     Amul Milk  Nestle Milk
    

    Rules can be mined at any level:

    • Low level (too specific, low support): {Amul Milk} ⇒ {Nestle Cookies}
    • High level (general, higher support): {Beverages} ⇒ {Bakery}

    Approaches to Multilevel Mining

    1. Uniform Minimum Support
    The same min_sup threshold is used across all levels of the hierarchy.

    Level 1 (General):   min_sup = 5%  ──▶  applied
    Level 2 (Specific):  min_sup = 5%  ──▶  same threshold
    
    • Pros: simple, single threshold to set.
    • Cons: high-level (general) items naturally have more support, while low-level (specific) items may fail the same threshold even if they represent genuinely important niche patterns — some interesting low-level rules are missed.

    2. Reduced (Level-Specific) Minimum Support
    Each level of the hierarchy has its own, typically lower, minimum support threshold as you go deeper.

    Level 1 (General):   min_sup = 5%
    Level 2 (Category):  min_sup = 3%
    Level 3 (Specific):  min_sup = 1%
    
    • Pros: accounts for the fact that specific items are naturally rarer; lets genuinely interesting low-level patterns surface.
    • Cons: more thresholds to tune; poor tuning can either flood results with noise or still miss patterns.

    Within reduced support, there are two search strategies:

    • Level-by-level independent — each level is mined independently regardless of results at other levels.
    • Level-cross filtering by single/k-itemset — an itemset at a lower level is examined only if its corresponding ancestor itemset at the level above was found frequent (this prunes the search space significantly using apriori-style reasoning across levels).

    3. Group-Based (Item-Specific) Minimum Support
    Different groups of items (rather than levels) get their own custom support thresholds, letting users assign lower thresholds to specific item groups they know to be rare-but-important (e.g., luxury goods) and higher thresholds elsewhere.

    Summary

    Approach Threshold granularity Trade-off
    Uniform min_sup One threshold, all levels Simple, but biased toward general-level rules
    Reduced min_sup One threshold per level Captures specific-level rules, more tuning needed
    Group-based min_sup Custom threshold per item group Most flexible, most tuning effort

    In short: multilevel mining lets analysts see both broad, general trends and narrow, specific patterns by mining across a concept hierarchy — with reduced/level-specific support being the most common practical approach to avoid missing important niche rules.

  24. Q8b. Explain Naive Bayesian classification algorithm.20207m

    Module 3: Classification and Prediction

    Explain Naive Bayesian classification algorithm.

    View this question on its own page →
  25. Q9a. With neat diagram, explain the architecture of data warehouse. Explain the terms ROLAP, MOLAP and HOLAP.20207m

    Module 1: Data Warehousing and Business Analysis

    With neat diagram, explain the architecture of data warehouse. Explain the terms ROLAP, MOLAP and HOLAP.

    View this question on its own page →
    Worked Solution

    Data Warehouse Architecture (with diagram) + ROLAP, MOLAP, HOLAP

    Architecture Diagram

    ┌───────────┐ ┌───────────┐ ┌───────────┐
    │ Source DB1│ │ Source DB2│ │ Ext. Files│
    └─────┬─────┘ └─────┬─────┘ └─────┬─────┘
          └──────────────┼──────────────┘
                          ▼
                ┌───────────────────┐
                │   ETL: Extract,     │
                │   Clean, Transform, │
                │   Load               │
                └──────────┬──────────┘
                            ▼
                ┌───────────────────┐
                │  Data Warehouse     │◀──▶ Metadata Repository
                │ (fact + dimension   │
                │  tables)            │
                └──────────┬──────────┘
                            │
            ┌───────────────┼───────────────┐
            ▼                ▼                ▼
      ┌───────────┐   ┌────────────┐   ┌────────────┐
      │ Data Marts │   │ OLAP Server │   │  Mining    │
      │ (dept-wise)│   │(ROLAP/MOLAP/│   │  Engine    │
      │            │   │  HOLAP)     │   │            │
      └───────────┘   └────────────┘   └────────────┘
                            │
                            ▼
                  Front-end Tools (Query,
                  Reporting, Dashboards)
    

    Layers

    1. Source systems — operational databases, files, external feeds.
    2. ETL layer — extracts, cleans, transforms, and loads data into the warehouse.
    3. Metadata repository — describes schema, source mappings, and lineage.
    4. Central warehouse — stores integrated, subject-oriented, time-variant data as fact/dimension tables.
    5. Data marts / OLAP servers / mining engine — provide focused or multidimensional access.
    6. Front-end tools — dashboards, reports, ad-hoc query tools for end users.

    ROLAP, MOLAP, HOLAP (OLAP server types)

    Type Storage Speed Scalability
    ROLAP (Relational OLAP) Star/snowflake tables in an RDBMS; multidimensional queries translated to SQL Slower (query-time computation) Very high — handles huge data volumes
    MOLAP (Multidimensional OLAP) Pre-computed proprietary cube (array structure) Fastest (pre-aggregated lookups) Limited — cube can explode in size for sparse/high-cardinality data
    HOLAP (Hybrid OLAP) Detail data in relational tables, summary data in cubes Balanced High — combines both strengths

    In short: the architecture moves data from many raw sources through ETL into one integrated warehouse, which is then served up via an OLAP layer — and ROLAP/MOLAP/HOLAP are simply three different engineering trade-offs (storage vs speed vs scale) for implementing that OLAP layer.

  26. Q9b. What are the differences between the three main types of data warehouse usage—information processing, analytical processing and data mining? Discuss the motivation behind OLAP mining (OLAM).20207m

    Module 1: Data Warehousing and Business Analysis

    What are the differences between the three main types of data warehouse usage—information processing, analytical processing and data mining? Discuss the motivation behind OLAP mining (OLAM).

    View this question on its own page →
    Worked Solution

    Data Warehouse Usage Types & Motivation for OLAM

    (Same underlying question as the 2022 paper — see below for the full breakdown.)

    Three Types of Data Warehouse Usage

    Aspect Information Processing Analytical Processing Data Mining
    Goal Query, basic statistics, reporting Multidimensional analysis (OLAP) Discover hidden patterns/knowledge
    Operations Simple queries, cross-tabs, charts Roll-up, drill-down, slice, dice, pivot Classification, clustering, association, prediction
    User interaction Passive — user asks, system reports Interactive — user explores the cube Can be automatic — system discovers patterns
    Output Reports, summary tables Multidimensional views Rules, models, clusters, predictions
    Example "Total sales last quarter" "Sales by Region × Product × Time, drilled to month" "Which customers are likely to churn?"
    • Information processing answers known questions with simple queries/reports.
    • Analytical processing (OLAP) lets users interactively explore a multidimensional cube.
    • Data mining automatically discovers patterns the user didn't know to ask about.

    Motivation for OLAP Mining (OLAM)

    OLAM integrates OLAP with data mining, applying mining directly on multidimensional cubes instead of raw flat data:

    1. High-quality warehouse data — already cleaned/integrated, giving more reliable mining results than mining raw operational data.
    2. Reusable infrastructure — ETL, metadata, and OLAP engines built for the warehouse serve mining too, avoiding duplicated effort.
    3. OLAP-based exploratory analysis — analysts drill/roll/slice/dice to narrow down interesting regions before mining, far more efficient than mining an entire raw dataset.
    4. Flexible, on-line mining function selection — users can switch between classification, association, clustering, etc. at different cube cells/granularities within the same interactive session.
            Data Warehouse (Cube)
                   │
         ┌─────────┼─────────┐
         ▼         ▼         ▼
       OLAP     OLAM       Mining
     (explore) (integrated) (patterns)
         └─────────┴─────────┘
    

    In short: OLAM combines OLAP's interactive navigation with mining's automatic pattern discovery, letting analysts first zoom into the relevant cube region, then mine it for deeper insight.