2026 question paper

Data Mining

26 questions

  1. Q1a. A data cube contains 5 products, 4 regions and 12 months. The total number of base-level cells is (i) 120 (ii) 240 (iii) 180 (iv) 36020262m

    Module 1: Data Warehousing and Business Analysis

    A data cube contains 5 products, 4 regions and 12 months. The total number of base-level cells is

    (i) 120
    (ii) 240
    (iii) 180
    (iv) 360

    View this question on its own page →
    Worked Solution

    Solution

    Correct Answer: (ii) 240

    Explanation

    In a data cube, the number of base-level (apex-excluded, lowest-level) cells is the product of the number of distinct values in each dimension:

    Cells = products x regions x months = 5 x 4 x 12 = 240

    Each cell stores one measure value (for example total sales) for one unique combination of product, region and month.

    Why other options are incorrect:

    • (i) 120 - ignores one dimension (5 x 4 x 6 or similar).
    • (iii) 180 and (iv) 360 - not the product of 5, 4 and 12.

    Answer: (ii) 240

  2. Q1b. Which schema generally contains a central fact table connected directly to multiple dimension tables? (i) Network schema (ii) Hierarchical schema (iii) Star schema (iv) Object schema20262m

    Module 1: Data Warehousing and Business Analysis

    Which schema generally contains a central fact table connected directly to multiple dimension tables?

    (i) Network schema
    (ii) Hierarchical schema
    (iii) Star schema
    (iv) Object schema

    View this question on its own page →
    Worked Solution

    Solution

    Correct Answer: (iii) Star schema

    Explanation

    A star schema has one large central fact table (measures such as sales amount, plus foreign keys) directly connected to several dimension tables (such as time, product, customer, location). The diagram looks like a star, and the dimension tables are usually denormalized, which keeps queries simple and fast.

    Why other options are incorrect:

    • (i) Network schema and (ii) Hierarchical schema - old database models, not data warehouse schemas.
    • (iv) Object schema - used in object-oriented databases.

    Key Points to Remember:

    • Snowflake schema = star schema with normalized dimension tables.
    • Fact constellation = several fact tables sharing dimensions.

    Answer: (iii) Star schema

  3. Q1c. If a dataset contains extreme outliers that strongly affect the mean, which measure is generally more robust for describing central tendency? (i) Mean (ii) Variance (iii) Median (iv) Standard deviation20262m

    Module 2: Data Mining Fundamentals and Association Rule Mining

    If a dataset contains extreme outliers that strongly affect the mean, which measure is generally more robust for describing central tendency?

    (i) Mean
    (ii) Variance
    (iii) Median
    (iv) Standard deviation

    View this question on its own page →
    Worked Solution

    Solution

    Correct Answer: (iii) Median

    Explanation

    The median is the middle value of the sorted data. It depends only on the position of values, so a few extreme outliers barely change it. The mean uses every value, so one huge value can pull it far from the typical value.

    Example: data 10, 12, 13, 14, 500. Mean = 109.8 (misleading), median = 13 (representative).

    Why other options are incorrect:

    • (i) Mean - strongly affected by outliers.
    • (ii) Variance and (iv) Standard deviation - these measure spread, not central tendency, and are also sensitive to outliers.

    Answer: (iii) Median

  4. Q1d. In a database of 200 transactions, an itemset occurs in 50 transactions. Its support is (i) 10% (ii) 25% (iii) 20% (iv) 50%20262m

    Module 2: Data Mining Fundamentals and Association Rule Mining

    In a database of 200 transactions, an itemset occurs in 50 transactions. Its support is

    (i) 10%
    (ii) 25%
    (iii) 20%
    (iv) 50%

    View this question on its own page →
    Worked Solution

    Solution

    Correct Answer: (ii) 25%

    Explanation

    Support of an itemset = (number of transactions containing the itemset) / (total number of transactions)

    Support = 50 / 200 = 0.25 = 25%

    Why other options are incorrect:

    • (i) 10% = 20/200, (iii) 20% = 40/200, (iv) 50% = 100/200.

    Answer: (ii) 25%

  5. Q1e. Support of an itemset represents (i) Probability that the consequent occurs given the antecedent (ii) Number of attributes in the database (iii) Frequency with which the itemset occurs in the database (iv) Number of rules generated20262m

    Module 2: Data Mining Fundamentals and Association Rule Mining

    Support of an itemset represents

    (i) Probability that the consequent occurs given the antecedent
    (ii) Number of attributes in the database
    (iii) Frequency with which the itemset occurs in the database
    (iv) Number of rules generated

    View this question on its own page →
    Worked Solution

    Solution

    Correct Answer: (iii) Frequency with which the itemset occurs in the database

    Explanation

    Support tells how often an itemset appears in the transaction database (as a count or as a fraction/percentage of all transactions). Itemsets whose support is at least the minimum support threshold are called frequent itemsets.

    Why other options are incorrect:

    • (i) This describes confidence: P(consequent | antecedent).
    • (ii) Number of attributes and (iv) Number of rules - not what support means.

    Key Points to Remember:

    • Support(A => B) = P(A and B)
    • Confidence(A => B) = support(A and B) / support(A)

    Answer: (iii) Frequency with which the itemset occurs in the database

  6. Q1f. A classifier correctly classifies 180 out of 200 instances. Its accuracy is (i) 80% (ii) 90% (iii) 85% (iv) 95%20262m

    Module 3: Classification and Prediction

    A classifier correctly classifies 180 out of 200 instances. Its accuracy is

    (i) 80%
    (ii) 90%
    (iii) 85%
    (iv) 95%

    View this question on its own page →
    Worked Solution

    Solution

    Correct Answer: (ii) 90%

    Explanation

    Accuracy = (correctly classified instances) / (total instances)

    Accuracy = 180 / 200 = 0.90 = 90%

    In confusion-matrix terms: Accuracy = (TP + TN) / (TP + TN + FP + FN).

    Why other options are incorrect:

    • (i) 80% = 160/200, (iii) 85% = 170/200, (iv) 95% = 190/200.

    Answer: (ii) 90%

  7. Q1g. Which technique is particularly useful for reducing overfitting and obtaining a more reliable estimate of classifier performance? (i) Cross-validation (ii) Increasing noise (iii) Data duplication (iv) Removing the test set20262m

    Module 3: Classification and Prediction

    Which technique is particularly useful for reducing overfitting and obtaining a more reliable estimate of classifier performance?

    (i) Cross-validation
    (ii) Increasing noise
    (iii) Data duplication
    (iv) Removing the test set

    View this question on its own page →
    Worked Solution

    Solution

    Correct Answer: (i) Cross-validation

    Explanation

    In k-fold cross-validation the data is split into k parts (folds). The model is trained on k-1 folds and tested on the remaining fold, repeating k times so every fold is used once for testing. The average score gives a more reliable estimate of performance, and because the model is tested on unseen data each time, it helps detect and reduce overfitting.

    Why other options are incorrect:

    • (ii) Increasing noise - makes the model worse.
    • (iii) Data duplication - causes test data leakage and over-optimistic results.
    • (iv) Removing the test set - removes any way to measure performance on unseen data.

    Answer: (i) Cross-validation

  8. Q1h. A major limitation of K-means is (i) It cannot process numerical data (ii) It always identifies outliers correctly (iii) It requires the number of clusters to be specified in advance (iv) It does not use distance measures20262m

    Module 4: Cluster Analysis

    A major limitation of K-means is

    (i) It cannot process numerical data
    (ii) It always identifies outliers correctly
    (iii) It requires the number of clusters to be specified in advance
    (iv) It does not use distance measures

    View this question on its own page →
    Worked Solution

    Solution

    Correct Answer: (iii) It requires the number of clusters to be specified in advance

    Explanation

    K-means needs the user to give k, the number of clusters, before it runs. A wrong k gives poor clusters, and the right k is usually unknown. Other limitations: sensitive to outliers, depends on initial centroids, finds only spherical clusters, works on numeric data.

    Why other options are incorrect:

    • (i) K-means is designed for numerical data.
    • (ii) It does not handle outliers well; they pull centroids away.
    • (iv) It relies on a distance measure (usually Euclidean).

    Answer: (iii) It requires the number of clusters to be specified in advance

  9. Q1i. If a word occurs 4 times in a document containing 100 words, its term frequency is (i) 0.004 (ii) 0.4 (iii) 0.04 (iv) 420262m

    Module 5: Mining Object, Spatial, Multimedia, Text and Web Data

    If a word occurs 4 times in a document containing 100 words, its term frequency is

    (i) 0.004
    (ii) 0.4
    (iii) 0.04
    (iv) 4

    View this question on its own page →
    Worked Solution

    Solution

    Correct Answer: (iii) 0.04

    Explanation

    Term frequency (TF) = (number of times the term occurs in the document) / (total number of words in the document)

    TF = 4 / 100 = 0.04

    TF is the first part of the TF-IDF weight used in text mining: TF-IDF = TF x log(N / df).

    Why other options are incorrect:

    • (i) 0.004 = 4/1000, (ii) 0.4 = 4/10, (iv) 4 is the raw count, not the frequency ratio.

    Answer: (iii) 0.04

  10. Q1j. Which technique is most appropriate for discovering hyperlinks and relationships among Web pages? (i) Web structure mining (ii) Numerical integration (iii) Web usage mining (iv) Data normalization20262m

    Module 5: Mining Object, Spatial, Multimedia, Text and Web Data

    Which technique is most appropriate for discovering hyperlinks and relationships among Web pages?

    (i) Web structure mining
    (ii) Numerical integration
    (iii) Web usage mining
    (iv) Data normalization

    View this question on its own page →
    Worked Solution

    Solution

    Correct Answer: (i) Web structure mining

    Explanation

    Web structure mining analyses the link structure of the Web: hyperlinks between pages and the relationships among them. It is used to find authoritative pages, hubs and communities. Well-known algorithms: PageRank and HITS.

    The three types of web mining:

    • Web content mining - the content of pages (text, images)
    • Web structure mining - hyperlinks between pages
    • Web usage mining - user access logs and click patterns

    Why other options are incorrect:

    • (ii) Numerical integration - a mathematical technique, unrelated.
    • (iii) Web usage mining - studies user behavior from logs, not links.
    • (iv) Data normalization - a preprocessing step.

    Answer: (i) Web structure mining

  11. Budget App•POCKETLY

    Pocketly on Android

    Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

    Install Pocketly
  12. Q2a. Explain the major components of a data warehouse and discuss the functions of data extraction, cleaning, transformation, metadata management and reporting in the data-warehouse environment.20267m

    Module 1: Data Warehousing and Business Analysis

    Explain the major components of a data warehouse and discuss the functions of data extraction, cleaning, transformation, metadata management and reporting in the data-warehouse environment.

    View this question on its own page →
    Worked Solution

    Components of a Data Warehouse and Their Functions

    A data warehouse is a subject-oriented, integrated, time-variant and non-volatile collection of data that supports management's decision-making.

    Architecture

    Operational DBs, files,    ETL / Staging area            Warehouse layer          Front-end tools
    external sources           (extract, clean,              (DW database,            (query, reports,
                                transform, load)              data marts)              OLAP, mining)
       [Source 1] \                                                                  
       [Source 2] ---> [ Extraction -> Cleaning -> Transformation -> Load ] ---> [ Data Warehouse ] ---> [ Users ]
       [Source 3] /                         ^                                   ^
                                            |______ [ Metadata repository ] ____|
    

    Major components

    Component Role
    Data sources Operational databases, flat files, external data feeding the warehouse
    ETL / staging area Extracts, cleans, transforms and loads data
    Data warehouse database Central integrated store, usually on a relational DBMS or multidimensional server
    Data marts Subject-specific subsets (sales, finance)
    Metadata repository Data about the data: schema, mappings, rules, lineage
    Query, reporting and OLAP tools Let users analyse and view the data
    Management tools Scheduling, security, backup, monitoring

    Functions in the warehouse environment

    1. Data extraction: Pulls the required data from heterogeneous sources, either fully or incrementally (only changes), without disturbing operational systems.
    2. Data cleaning: Detects and fixes errors: missing values, duplicates, wrong formats, inconsistent codes. This makes the warehouse data reliable.
    3. Data transformation: Converts data into one consistent format: unit and format conversion, key mapping, aggregation, derived fields, and applying business rules.
    4. Metadata management: Stores and maintains technical metadata (schema, mappings, ETL logic), business metadata (definitions, ownership) and operational metadata (load times, history). It helps users find and trust data and supports lineage.
    5. Reporting: Gives users standard and ad hoc reports, dashboards, OLAP analysis and data mining outputs that turn warehouse data into decisions.

    Conclusion

    ETL fills the warehouse with clean, consistent data, metadata describes and controls it, and query/reporting tools turn it into information for decision-making.

  13. Q2b. A data warehouse contains sales data for 4 regions, 12 months and 5 product categories. Each combination stores the total sales value. Determine: (i) The total number of possible multidimensional cells, (ii) The number of cells required for one region across all months and products and (iii) Explain how roll-up, drill-down, slice and dice operations can be performed on this cube.20267m

    Module 1: Data Warehousing and Business Analysis

    A data warehouse contains sales data for 4 regions, 12 months and 5 product categories. Each combination stores the total sales value. Determine:

    (i) The total number of possible multidimensional cells,
    (ii) The number of cells required for one region across all months and products and
    (iii) Explain how roll-up, drill-down, slice and dice operations can be performed on this cube.

    View this question on its own page →
    Worked Solution

    Data Cube: Sales by Region, Month and Product Category

    Dimensions: Region = 4, Month = 12, Product category = 5. Measure: total sales.

    (i) Total number of possible multidimensional cells

    Each combination of (region, month, category) is one cell:

    Cells = 4 x 12 x 5 = 240

    (ii) Cells required for one region across all months and products

    Fix the region (1 value) and vary the other two dimensions:

    Cells = 1 x 12 x 5 = 60

    (iii) OLAP operations on this cube

    Operation What it does Example on this cube Result
    Roll-up Aggregate to a higher level of a dimension hierarchy (or remove a dimension) Months to quarters (12 to 4); sales then shown per region, quarter and category 4 x 4 x 5 = 80 cells
    Drill-down Go from summary to more detailed data Quarter to month, or month to day; Region to city More cells than before (e.g. back to 240)
    Slice Select one value on one dimension, giving a sub-cube with one dimension fewer Region = "North": a 2-D table of month x category 12 x 5 = 60 cells
    Dice Select ranges/values on two or more dimensions, giving a smaller cube Regions {North, South}, months Jan to Mar, categories {Electronics, Clothing} 2 x 3 x 2 = 12 cells
    Pivot (rotate) Rotate axes to see the data from another view Swap month and category axes Same cells, new view

    Extra: number of cuboids

    With 3 dimensions and no hierarchies, the cube has 2^3 = 8 cuboids: the base cuboid (region, month, category), three 2-D cuboids, three 1-D cuboids and the apex (grand total).

    Conclusion

    The cube holds 240 base cells; one region slice needs 60 cells; roll-up, drill-down, slice and dice let a user move between summary and detail views.

  14. Q3a. A dataset contains numerical, categorical and missing attributes. Develop a suitable preprocessing pipeline involving data cleaning, integration, transformation, reduction and discretization. Justify the choice of each operation.20267m

    Module 2: Data Mining Fundamentals and Association Rule Mining

    A dataset contains numerical, categorical and missing attributes. Develop a suitable preprocessing pipeline involving data cleaning, integration, transformation, reduction and discretization. Justify the choice of each operation.

    View this question on its own page →
    Worked Solution

    Preprocessing Pipeline for a Dataset with Numerical, Categorical and Missing Attributes

    Raw data is usually incomplete, noisy and inconsistent. The steps below are applied in this order: clean, integrate, transform, reduce, discretize.

    Pipeline

    Step What to do Justification
    1. Data cleaning Missing values: numerical attributes get mean/median (median if skewed); categorical attributes get the mode or an "Unknown" label; if over about 50% of a column is missing, drop it. Noise: smooth by binning or regression. Outliers: detect with IQR or z-score; cap or remove if they are errors. Inconsistency: standardize codes and formats (e.g. "M"/"Male") Algorithms cannot handle missing values and noise lowers accuracy
    2. Data integration Merge multiple sources, resolve schema and entity conflicts (same customer, different IDs), remove duplicates. Check redundant attributes with correlation (numerical) or chi-square (categorical) Avoids duplicates and conflicting values and keeps one consistent view
    3. Data transformation Normalize numerical attributes (min-max to [0, 1] or z-score); encode categorical attributes (one-hot, label encoding); apply aggregation or log transform for skewed data Distance-based methods (KNN, K-means) would otherwise be dominated by large-scale attributes; most algorithms need numbers
    4. Data reduction Attribute subset selection (drop irrelevant/redundant), PCA for dimensionality reduction, sampling (numerosity reduction) if the data is huge Lowers storage and computation time and reduces the curse of dimensionality
    5. Discretization Convert continuous attributes into intervals using equal-width or equal-frequency binning, and build concept hierarchies (age to young / middle / old) Needed for association rules and decision trees, and gives more understandable patterns

    Why this order

    Cleaning must come first, because wrong or missing values would distort later steps. Integration comes before transformation so that scaling is done on the final merged data. Reduction and discretization come last, once the data is clean and consistent.

    Example

    Attribute Income (numerical, 8% missing): fill with median, cap outliers at the 99th percentile, normalize to [0, 1], then bin into Low / Medium / High. Attribute City (categorical): fix spelling variants and one-hot encode.

    Conclusion

    The pipeline produces complete, consistent, scaled and compact data, which gives more accurate and reliable mining results.

  15. Q3b. Explain the major functionalities of data mining. Discuss how data preprocessing improves the quality and reliability of knowledge discovered from large datasets.20267m

    Module 2: Data Mining Fundamentals and Association Rule Mining

    Explain the major functionalities of data mining. Discuss how data preprocessing improves the quality and reliability of knowledge discovered from large datasets.

    View this question on its own page →
    Worked Solution

    Functionalities of Data Mining and the Role of Preprocessing

    Data mining is the process of discovering interesting patterns and knowledge from large amounts of data. Its functionalities specify the kinds of patterns that can be found.

    Major functionalities

    Functionality Description Example
    Concept/class description (characterization and discrimination) Summarizes the general features of a class, or compares classes Features of customers who buy a lot vs those who buy little
    Association and correlation analysis Finds items that occur together (frequent patterns) Bread and butter bought together (market basket)
    Classification Builds a model from labelled data to predict a class label (supervised) Classify loan applicants as safe or risky
    Prediction / regression Predicts a continuous value Forecast next month's sales
    Clustering Groups similar objects with no predefined labels (unsupervised) Customer segmentation
    Outlier analysis Finds objects that do not fit the general behaviour Credit card fraud detection
    Evolution / trend analysis Studies how objects change over time Stock price trends

    How preprocessing improves quality and reliability

    Real-world data is often incomplete, noisy and inconsistent; mining such data gives unreliable results ("garbage in, garbage out"). Preprocessing improves the data on these quality measures:

    Quality factor How preprocessing helps
    Accuracy Cleaning removes noise and errors
    Completeness Missing values are filled or handled
    Consistency Integration and standardization remove conflicts and duplicates
    Believability Verified, cleaned data is trusted more
    Interpretability Discretization and concept hierarchies make patterns easier to understand
    Efficiency Reduction cuts data size and mining time

    Effects on the discovered knowledge

    • Cleaning prevents wrong patterns caused by errors and outliers.
    • Integration gives a single, consistent view across sources.
    • Transformation (normalization) stops large-scale attributes from dominating distance-based algorithms.
    • Reduction removes irrelevant attributes, so models are simpler and less prone to overfitting.
    • Discretization makes rules concise and suitable for algorithms like decision trees and Apriori.

    Conclusion

    Good preprocessing improves the accuracy, stability and trustworthiness of classification, clustering and association results, and often takes most of the effort in a data mining project.

  16. Q4a. Explain the Apriori principle and analyze how candidate generation and pruning reduce the search space during frequent-itemset mining. Compare Apriori with a scalable frequent-pattern mining approach such as FP-Growth.20267m

    Module 2: Data Mining Fundamentals and Association Rule Mining

    Explain the Apriori principle and analyze how candidate generation and pruning reduce the search space during frequent-itemset mining. Compare Apriori with a scalable frequent-pattern mining approach such as FP-Growth.

    View this question on its own page →
    Worked Solution

    Apriori Principle, Candidate Generation and Pruning, and Comparison with FP-Growth

    Apriori principle

    All non-empty subsets of a frequent itemset must also be frequent. Equivalently, if an itemset is infrequent, every superset of it is also infrequent (the anti-monotone property of support).

    Example: if {A, D} is infrequent, then {A, B, D}, {A, C, D} and {A, B, C, D} cannot be frequent, so they need not be checked.

    How Apriori works (level-wise search)

    1. Scan the database and find frequent 1-itemsets L1.
    2. Candidate generation (join step): join Lk-1 with itself to produce candidate k-itemsets Ck.
    3. Pruning: remove any candidate that has a (k-1)-subset that is not in Lk-1.
    4. Scan the database to count the support of the remaining candidates; keep those with support at least min_sup as Lk.
    5. Repeat until no new frequent itemsets are found.

    How candidate generation and pruning reduce the search space

    With n items there are up to 2^n - 1 possible itemsets, too many to test.

    • Join only combines frequent itemsets, so only itemsets that could be frequent are generated.
    • Pruning with the Apriori property removes candidates before the costly database scan.

    Example: L2 = {AB, AC, AD, BC}. The join step (itemsets sharing the first item) gives ABC, ABD and ACD. ABC survives, because AB, AC and BC are all frequent. ABD is pruned because BD is not in L2, and ACD is pruned because CD is not in L2. Only ABC is counted in the database scan.

    Apriori vs FP-Growth

    Basis Apriori FP-Growth
    Approach Generate-and-test (candidate generation) Pattern growth using an FP-tree
    Candidate generation Required; can be huge None
    Database scans One per level (many scans) Two scans in total
    Data structure Candidate sets and hash trees Compact FP-tree plus header table
    Strategy Breadth-first, level-wise Divide-and-conquer (conditional pattern bases)
    Speed on large or dense data Slow Much faster
    Memory Large candidate sets FP-tree must fit in memory; compact for dense data
    Complexity to implement Simple More complex

    Conclusion

    Apriori is simple and prunes well using the anti-monotone property, but it is costly because of repeated scans and many candidates. FP-Growth removes candidate generation by compressing the data into an FP-tree, so it is more scalable.

  17. Q4b. Explain different types of association rules, including Boolean, quantitative, single-dimensional, multidimensional, positive and negative association rules. Discuss situations in which each type is useful.20267m

    Module 2: Data Mining Fundamentals and Association Rule Mining

    Explain different types of association rules, including Boolean, quantitative, single-dimensional, multidimensional, positive and negative association rules. Discuss situations in which each type is useful.

    View this question on its own page →
    Worked Solution

    Types of Association Rules and When Each Is Useful

    An association rule A => B states that when A occurs, B tends to occur too, measured by support and confidence.

    Types of association rules

    Type Meaning Example Useful when
    Boolean Items are only present or absent computer => antivirus software Market basket analysis with yes/no purchase data
    Quantitative Involves numeric attributes, which are discretized into ranges age(30-39) AND income(42K-48K) => buys(HDTV) Data has numeric attributes such as age, salary, quantity
    Single-dimensional Only one predicate (dimension) is used buys(X, "milk") => buys(X, "bread") Simple item-to-item patterns in one table of transactions
    Multidimensional Two or more dimensions or predicates age(X, "20-29") AND occupation(X, "student") => buys(X, "laptop") Data warehouses and customer data with many attributes
    Positive Rule on presence of items (A => B) tea => sugar Finding items to bundle, promote or place together
    Negative Rule involving absence: A => NOT B, or NOT A => B buys tea => NOT buys coffee Finding substitutes and competing products, fraud and anomaly cases

    Related types (for completeness)

    • Multilevel rules: use concept hierarchies ("milk" => "bread" vs "skim milk" => "wheat bread").
    • Single-level rules: all items at the same abstraction level.

    Situations where each helps

    • Boolean / single-dimensional / positive: supermarket layout, cross-selling and recommendations.
    • Quantitative: targeting customers by age or income bands, pricing and credit analysis.
    • Multidimensional: customer segmentation and campaigns using several attributes together.
    • Negative: detecting substitute products (so you do not stock both aggressively) and unusual behaviour.

    Evaluating the rules

    Strong rules meet minimum support and confidence; lift is used to check that A and B are really related (lift > 1 means positive correlation).

    Conclusion

    The choice of rule type depends on the data (binary or numeric, one or many attributes) and the business goal.

  18. Q5. Design an experimental framework for evaluating a classification model. Explain the use of training/testing datasets, cross-validation, confusion matrix, accuracy, precision, recall, F1-score and ROC-based evaluation. Discuss how ensemble methods can improve predictive performance.202614m

    Module 3: Classification and Prediction

    Design an experimental framework for evaluating a classification model. Explain the use of training/testing datasets, cross-validation, confusion matrix, accuracy, precision, recall, F1-score and ROC-based evaluation. Discuss how ensemble methods can improve predictive performance.

    View this question on its own page →
    Worked Solution

    Experimental Framework for Evaluating a Classification Model

    The aim is to measure how well the model will work on unseen data, reliably and fairly.

    Step 1: Prepare the data

    Clean the data, handle missing values, encode and scale features. Fix a random seed so results can be repeated.

    Step 2: Training and testing datasets

    • Hold-out: split the data, for example 70% training / 30% testing (or 80/20). Use a stratified split so the class proportions are the same in both sets.
    • Training set: used to build (fit) the model.
    • Validation set (optional): used to tune hyperparameters (e.g. tree depth).
    • Test set: used only once at the end; never used for training or tuning, to avoid leakage.

    Step 3: Cross-validation

    k-fold cross-validation (k = 10 is common):

    1. Split the data into k equal folds.
    2. Train on k-1 folds, test on the remaining fold.
    3. Repeat k times so every fold is used once for testing.
    4. Average the k scores.

    This gives a more reliable estimate than a single split and reduces overfitting. Variants: stratified k-fold, leave-one-out (small data) and bootstrap.

    Step 4: Confusion matrix

    Predicted Positive Predicted Negative
    Actual Positive TP FN
    Actual Negative FP TN

    Step 5: Evaluation measures

    Measure Formula Meaning
    Accuracy (TP + TN) / (TP + TN + FP + FN) Overall fraction correct; misleading for imbalanced classes
    Precision TP / (TP + FP) Of the predicted positives, how many are truly positive
    Recall (sensitivity, TPR) TP / (TP + FN) Of the actual positives, how many were found
    F1-score 2 x Precision x Recall / (Precision + Recall) Harmonic mean of precision and recall
    Specificity TN / (TN + FP) Of the actual negatives, how many were correct
    False positive rate (FPR) FP / (FP + TN) Used on the ROC curve

    Example: TP = 40, FP = 10, FN = 5, TN = 45 (100 instances)

    • Accuracy = 85/100 = 0.85
    • Precision = 40/50 = 0.80
    • Recall = 40/45 = 0.889
    • F1 = 2(0.80)(0.889)/(0.80 + 0.889) = 0.842

    Step 6: ROC-based evaluation

    The ROC curve plots TPR (y-axis) against FPR (x-axis) at different classification thresholds.

    • A curve close to the top-left corner means a good model.
    • The diagonal line is random guessing.
    • AUC (area under the curve) summarizes performance: 1.0 is perfect, 0.5 is random.
    • ROC is useful for comparing models and for imbalanced data, together with precision-recall curves.

    Step 7: Compare and report

    Compare against a baseline (such as majority class), compare several models on the same folds, report the mean and standard deviation of the metrics, and check with a significance test if needed.

    How ensemble methods improve predictive performance

    An ensemble combines several models so that the combined prediction is better than any single model.

    Method Idea Effect
    Bagging (e.g. Random Forest) Train models on bootstrap samples; vote or average Reduces variance and overfitting
    Boosting (e.g. AdaBoost, Gradient Boosting) Train models in sequence; each focuses on the previous errors Reduces bias, gives high accuracy
    Stacking A meta-model learns to combine the outputs of different models Uses the strengths of diverse models

    Ensembles work because different models make different errors, and combining them cancels many of those errors. Ensembles should themselves be evaluated with the same cross-validation framework.

    Conclusion

    A sound framework uses a clean train/test split, cross-validation, several metrics (accuracy, precision, recall, F1, ROC-AUC) and, where needed, ensembles, to get a trustworthy estimate of how the model will perform in practice.

  19. Q6. Design a clustering framework for identifying customer segments using a large multidimensional dataset. Discuss preprocessing, feature selection, choice of clustering algorithm, selection of the number of clusters, outlier handling and cluster validation.202614m

    Module 4: Cluster Analysis

    Design a clustering framework for identifying customer segments using a large multidimensional dataset. Discuss preprocessing, feature selection, choice of clustering algorithm, selection of the number of clusters, outlier handling and cluster validation.

    View this question on its own page →
    Worked Solution

    Clustering Framework for Customer Segmentation

    Goal: group customers with similar behaviour so that marketing, pricing and service can be targeted per segment. Clustering is unsupervised: there are no predefined labels.

    Framework overview

    Business goal -> Data collection -> Preprocessing -> Feature selection
       -> Choose algorithm -> Choose number of clusters -> Handle outliers
       -> Validate clusters -> Profile segments and act
    

    1. Data and business goal

    Define what "similar" means. Typical features: RFM (recency, frequency, monetary value), age, income, location, product categories, web and app activity, tenure.

    2. Preprocessing

    • Missing values: impute (median/mode) or drop sparse columns.
    • Duplicates and inconsistencies: merge and standardize.
    • Categorical features: one-hot or label encoding (or use a distance made for mixed data).
    • Scaling: min-max or z-score, so large-range attributes (income) do not dominate distance.
    • Skewed features: log-transform spending data.

    3. Feature selection and dimensionality reduction

    In high-dimensional data, distances become less meaningful (curse of dimensionality).

    • Remove irrelevant and highly correlated features (correlation filter, variance threshold).
    • Use PCA to compress correlated features into fewer components.
    • Keep features that are meaningful to the business.

    4. Choice of clustering algorithm

    Algorithm Best when Limitation
    K-means Large data, roughly spherical clusters, numeric features Needs k; sensitive to outliers
    Hierarchical Smaller data, want a dendrogram Costly for large data
    DBSCAN Arbitrary shapes, noise present, k unknown Struggles with varying densities
    Gaussian mixture (model-based) Overlapping segments, soft membership Assumes distribution form
    K-prototypes / K-medoids Mixed numeric and categorical data Slower

    For a large customer dataset, K-means (or mini-batch K-means) is a good start; DBSCAN or GMM can be used to compare.

    5. Selecting the number of clusters

    • Elbow method: plot within-cluster sum of squares (WCSS) against k and pick the bend.
    • Silhouette score: choose the k with the highest average silhouette.
    • Gap statistic, or dendrogram cut for hierarchical clustering.
    • Business usefulness: the segments must be few enough to act on (often 3 to 8).

    6. Outlier handling

    Outliers pull centroids and distort K-means.

    • Detect with IQR, z-score, Local Outlier Factor or DBSCAN noise points.
    • Decide: remove or cap them if they are errors; keep them as a separate group if they are genuine (very high-value customers or fraud).

    7. Cluster validation

    Type Measure
    Internal (no labels) Silhouette coefficient (higher is better), Davies-Bouldin index (lower is better), Calinski-Harabasz index (higher is better)
    External (if labels exist) Adjusted Rand Index, purity
    Stability Re-run with different seeds or samples; clusters should stay similar
    Business validation Segments are distinct, interpretable and actionable

    8. Interpretation and use

    Profile each cluster by its mean feature values, for example high-value loyal, new customers, discount seekers, at risk of churn, and design offers for each. Monitor and re-cluster periodically as behaviour changes.

    Conclusion

    A good segmentation framework combines careful preprocessing, sensible feature selection, a suitable algorithm, a justified k, robust outlier handling and validation, ending in segments the business can act on.

  20. Q7a. Explain the challenges associated with mining spatial, multimedia, text and Web data. Discuss why conventional data-mining techniques may require modification for complex data objects.20267m

    Module 5: Mining Object, Spatial, Multimedia, Text and Web Data

    Explain the challenges associated with mining spatial, multimedia, text and Web data. Discuss why conventional data-mining techniques may require modification for complex data objects.

    View this question on its own page →
    Worked Solution

    Challenges in Mining Spatial, Multimedia, Text and Web Data

    These are complex data objects: they have rich structure, relationships between objects, or no fixed format, unlike simple records in a table.

    Challenges by data type

    Data type Main challenges
    Spatial (maps, GIS, satellite data) Objects are related by location and distance, so records are not independent (spatial autocorrelation); complex data types (points, lines, polygons); topological relations (near, inside, overlaps); different scales and resolutions; very large volume; uncertain or noisy measurements
    Multimedia (images, audio, video) Huge size; high-dimensional features; the semantic gap (low-level features such as colour or pitch vs human meaning); similarity search is costly; temporal order in video and audio; lack of labels
    Text Unstructured; very high dimensionality and sparse vectors; ambiguity (synonyms, polysemy); language dependence, slang, spelling errors; context and sarcasm are hard to capture
    Web Enormous and growing size; dynamic, constantly changing pages; heterogeneous formats; noisy, low-quality and spam content; need to use hyperlink structure and user logs; privacy concerns; distributed data

    Why conventional data mining techniques need modification

    Classic algorithms (Apriori, decision trees, K-means) assume flat, structured records with independent objects and simple numeric or categorical attributes. Complex objects break these assumptions:

    1. Dependence between objects: nearby spatial objects or linked web pages influence each other, so the independence assumption fails; methods must use spatial or link relationships.
    2. No ready attributes: images, audio and text must first go through feature extraction (colour histograms, TF-IDF, embeddings) before they can be mined.
    3. Special similarity measures: Euclidean distance on raw pixels or words is not meaningful; measures such as cosine similarity, spatial distance or edit distance are needed.
    4. High dimensionality and sparsity: requires dimensionality reduction (PCA, LSA) and feature selection.
    5. Scalability and indexing: need special index structures (R-trees, inverted indexes) and efficient algorithms.
    6. Semantics and context: need ontologies, language models and domain knowledge to interpret meaning.
    7. Mixed data: objects can combine several media (text + image + links), so integrated methods are needed.

    Examples of adapted techniques

    • Spatial: spatial association rules, spatial clustering (DBSCAN), spatial data cubes.
    • Multimedia: content-based image retrieval, feature-based classification.
    • Text: vector space model, TF-IDF, topic models.
    • Web: PageRank, HITS, web usage mining on logs.

    Conclusion

    Because complex objects are structured, interdependent, high-dimensional and semantic, standard mining methods must be extended with feature extraction, special similarity measures, relationship-aware algorithms and scalable indexing.

  21. Q7b. Explain the major techniques used in text mining, including document representation, term weighting, text classification, clustering and information extraction. Analyze the challenges caused by high dimensionality and semantic ambiguity.20267m

    Module 5: Mining Object, Spatial, Multimedia, Text and Web Data

    Explain the major techniques used in text mining, including document representation, term weighting, text classification, clustering and information extraction. Analyze the challenges caused by high dimensionality and semantic ambiguity.

    View this question on its own page →
    Worked Solution

    Major Techniques in Text Mining

    Text mining extracts useful patterns and knowledge from unstructured text such as emails, reviews, news and documents.

    Text preprocessing (first step)

    Tokenization, lower-casing, stop-word removal, stemming/lemmatization (running to run), and spelling correction.

    1. Document representation

    • Bag of words: each document is a vector of word counts, ignoring order.
    • Vector space model (VSM): documents and queries are vectors in term space; similarity is measured by cosine similarity.
    • N-grams: sequences of n words capture some word order.
    • Embeddings (word2vec, BERT): dense vectors that capture meaning.

    2. Term weighting

    Gives more importance to informative words.

    • TF = (count of term in document) / (total words in document). Example: 4 occurrences in 100 words gives TF = 0.04.
    • IDF = log(N / df), where N is the number of documents and df the number containing the term.
    • TF-IDF = TF x IDF: high for a word frequent in one document but rare overall.

    3. Text classification

    Assign documents to predefined categories (supervised): spam filtering, sentiment analysis, topic labelling.

    • Methods: Naive Bayes, SVM, KNN, decision trees, neural networks.

    4. Text clustering

    Group similar documents without labels (unsupervised): grouping news stories or support tickets.

    • Methods: K-means on TF-IDF vectors, hierarchical clustering, topic models (LDA).

    5. Information extraction

    Pull structured facts out of text.

    • Named entity recognition (people, places, organizations), relation extraction (who works for whom), event extraction; filling templates and databases.

    Challenges

    Challenge Problem Remedies
    High dimensionality Vocabulary can be tens of thousands of terms; vectors are very sparse; slow and prone to overfitting (curse of dimensionality) Stop-word removal, stemming, feature selection (chi-square, information gain), dimensionality reduction (LSA/SVD, PCA), embeddings
    Semantic ambiguity Polysemy (one word, many meanings, e.g. "bank"), synonymy (many words, one meaning), context, idioms, sarcasm, negation Word sense disambiguation, ontologies and WordNet, latent semantic analysis, contextual embeddings, part-of-speech tagging

    Other issues: multiple languages, noisy and informal text, very large corpora.

    Conclusion

    Text mining converts raw text into numeric representations (VSM with TF-IDF), then applies classification, clustering and extraction. Its main difficulties are the huge sparse feature space and the ambiguity of natural language, which are handled with dimensionality reduction and semantic methods.

  22. Budget App•POCKETLY

    Pocketly on Android

    Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

    Install Pocketly
  23. Q8a. Compare data warehouse architectures such as single-tier, two-tier and three-tier architectures. Analyze the role of a DBMS, ETL tools, metadata repository and query/reporting tools in supporting decision-making.20267m

    Module 1: Data Warehousing and Business Analysis

    Compare data warehouse architectures such as single-tier, two-tier and three-tier architectures. Analyze the role of a DBMS, ETL tools, metadata repository and query/reporting tools in supporting decision-making.

    View this question on its own page →
    Worked Solution

    Data Warehouse Architectures and Roles of Its Components

    Comparison of single-tier, two-tier and three-tier architectures

    Basis Single-tier Two-tier Three-tier
    Structure One layer: the warehouse and the operational data are kept together; users query it directly Two layers: a data source/warehouse (server) layer and a client layer, usually with data marts and a staging area Three layers: bottom (warehouse DB server + ETL), middle (OLAP server), top (front-end tools)
    Aim Minimize the amount of stored data (remove redundancy) Separate analysis from operational systems Best separation and scalability
    Performance Poor: analytical queries slow down operational work Better, but limited as the number of users grows Best: OLAP server handles heavy analysis
    Scalability Very low Limited (connectivity and network bottlenecks) High
    Complexity and cost Lowest Moderate Highest
    Use today Rare, not suitable for real warehousing Small or departmental warehouses Most common in enterprises

    Three-tier architecture in more detail

    Top tier:     Front-end tools   (query, reports, dashboards, OLAP clients, data mining)
                        |
    Middle tier:  OLAP server       (ROLAP / MOLAP / HOLAP)
                        |
    Bottom tier:  Data warehouse DB  <--  ETL  <--  Operational sources + Metadata repository
    

    Roles of components in decision-making

    Component Role
    DBMS Stores and manages warehouse data; provides indexing, partitioning, storage, security and efficient query processing for large volumes
    ETL tools Extract data from sources, clean and transform it, and load it into the warehouse, giving decision-makers accurate, consistent and integrated data
    Metadata repository Holds data about data: schema, mappings, lineage, business definitions, load history. It helps users understand and trust the data and helps administrators maintain it
    Query and reporting tools Let users run queries, produce reports and dashboards, perform OLAP analysis and data mining, so information reaches managers in usable form

    How they support decisions

    ETL supplies clean and consistent data; the DBMS stores it for fast access; metadata explains it; and query/reporting/OLAP tools let managers see trends, compare periods and drill into causes. Together they turn operational data into decision-ready information.

    Conclusion

    Single-tier is simple but impractical, two-tier is adequate for small systems, and three-tier is the preferred architecture for scalable, high-performance decision support.

  24. Q8b. Analyze the problems associated with missing values, noisy data, inconsistent data, redundant attributes and outliers. Compare different data-cleaning strategies for handling these problems.20267m

    Module 2: Data Mining Fundamentals and Association Rule Mining

    Analyze the problems associated with missing values, noisy data, inconsistent data, redundant attributes and outliers. Compare different data-cleaning strategies for handling these problems.

    View this question on its own page →
    Worked Solution

    Data Quality Problems and Data-Cleaning Strategies

    Real data is often incomplete, noisy and inconsistent. Cleaning fixes these problems before mining.

    Problems and strategies

    Problem Cause Cleaning strategies
    Missing values Faulty entry, equipment failure, non-response (1) Ignore the tuple (when many values are missing); (2) fill manually; (3) use a global constant ("Unknown"); (4) fill with the mean/median of the attribute; (5) use the class-wise mean; (6) use the most probable value by regression, decision tree or Bayes
    Noisy data (random error or variance) Faulty instruments, entry errors Binning (smooth by bin means, medians or boundaries); regression (fit a function); clustering (values outside clusters are noise); human inspection
    Inconsistent data Different formats or codes across sources, violated rules Apply integrity constraints and rules, standardize formats and codes, use reference data, correct manually or with tools, and track lineage
    Redundant attributes Same information in several attributes (derived or duplicated) Correlation analysis (Pearson r for numeric, chi-square for categorical); drop one of the pair; attribute selection
    Outliers Errors or genuine rare events Detect with IQR, z-score, clustering, DBSCAN, LOF; remove, cap (winsorize), transform, or keep if they are genuine and important

    Comparison of the strategies

    Strategy Advantage Disadvantage
    Ignore tuple Simple Loses data; biased if missing is not random
    Mean / median fill Easy, keeps all records Reduces variance; may distort relations
    Most probable value (model-based) Most accurate, uses other attributes More complex and costly
    Binning Simple smoothing Loses detail; choice of bins matters
    Regression smoothing Preserves the trend Needs a suitable model
    Clustering for noise/outliers Detects groups and unusual points Depends on the algorithm and its parameters
    Correlation-based removal Reduces redundancy and speeds up mining Correlation does not always mean redundancy
    Removing outliers Cleaner model May discard valuable rare events (e.g. fraud)

    Choosing a strategy

    • Use the median for skewed data and model-based filling when accuracy matters.
    • Remove outliers only if they are errors; keep genuine ones, because they may be the target of the analysis (fraud detection).
    • Always apply cleaning rules consistently and document them.

    Conclusion

    Each data problem needs a suitable strategy; simple methods are fast but approximate, while model-based methods are more accurate but more expensive. Good cleaning improves the reliability of the mined results.

  25. Q9a. Write a short note on ETL Framework. _(Q.9: short notes on any two of the following)_20267m

    Module 1: Data Warehousing and Business Analysis

    Write a short note on ETL Framework.

    (Q.9: short notes on any two of the following)

    View this question on its own page →
    Worked Solution

    ETL Framework

    ETL stands for Extract, Transform, Load. It is the process that moves data from many source systems into the data warehouse in a clean, consistent form.

    Flow

    Sources (DBs, files, apps) -> EXTRACT -> Staging area -> TRANSFORM -> LOAD -> Data warehouse
    

    Stages

    Stage What happens
    Extract Read the required data from heterogeneous sources (databases, flat files, APIs). Can be full extraction or incremental (only new or changed data, using timestamps or change data capture), without affecting the operational systems
    Transform Done in a staging area. Includes cleaning (fix errors, missing values, duplicates), standardization (formats, units, codes), integration (merge sources, key mapping), derivation (calculated fields), aggregation and applying business rules
    Load Write the transformed data into the warehouse: initial full load first, then periodic incremental/refresh loads; also update indexes, aggregates and data marts

    Supporting elements

    • Staging area: temporary storage where raw data is held and transformed.
    • Metadata: records mappings, rules and lineage.
    • Scheduling, logging and error handling: to run loads on time and track rejected records.

    ETL vs ELT

    In ELT the raw data is loaded first and transformed inside the target system (common with cloud and big data platforms).

    Tools

    Informatica, Talend, Microsoft SSIS, Apache NiFi, Pentaho.

    Importance and challenges

    • ETL gives decision-makers accurate, integrated and consistent data.
    • Challenges: data quality, large volumes, load-time windows, changing source schemas and keeping history.
  26. Q9b. Write a short note on Data Preprocessing Techniques. _(Q.9: short notes on any two of the following)_20267m

    Module 2: Data Mining Fundamentals and Association Rule Mining

    Write a short note on Data Preprocessing Techniques.

    (Q.9: short notes on any two of the following)

    View this question on its own page →
    Worked Solution

    Data Preprocessing Techniques

    Data preprocessing prepares raw data for mining by making it complete, consistent, accurate and compact. Real data is usually dirty (missing, noisy, inconsistent), so preprocessing is needed to get reliable results.

    Main techniques

    Technique Purpose Methods
    Data cleaning Fix errors in the data Fill missing values (ignore tuple, mean/median, most probable value); smooth noise (binning, regression, clustering); detect outliers; resolve inconsistencies
    Data integration Combine data from several sources Schema integration, entity resolution, remove duplicates, detect redundancy with correlation and chi-square
    Data transformation Convert data into suitable forms Normalization, aggregation, generalization, attribute construction, encoding
    Data reduction Get a smaller representation with the same analytical results Data cube aggregation, attribute subset selection, dimensionality reduction (PCA), numerosity reduction (sampling, histograms), compression
    Data discretization Replace numeric values with intervals or labels Equal-width and equal-frequency binning, histogram and clustering analysis, concept hierarchies

    Normalization formulas

    • Min-max: v' = (v - min) / (max - min) x (new_max - new_min) + new_min
    • Z-score: v' = (v - mean) / standard deviation
    • Decimal scaling: v' = v / 10^j, where j is the smallest integer such that max(|v'|) < 1

    Example (min-max to [0, 1]): values 200, 300, 400, 600, 1000: min = 200, max = 1000. The value 400 becomes (400 - 200)/(1000 - 200) = 0.25.

    Binning example

    Sorted data: 4, 8, 15, 21, 21, 24, 25, 28, 34. Equal-depth bins of size 3: {4, 8, 15}, {21, 21, 24}, {25, 28, 34}. Smoothing by bin means: {9, 9, 9}, {22, 22, 22}, {29, 29, 29}.

    Why it matters

    Preprocessing improves accuracy, efficiency and reliability of the mining results (garbage in, garbage out) and often takes most of the project effort.

  27. Q9c. Write a short note on Efficient Frequent Itemset Mining. _(Q.9: short notes on any two of the following)_20267m

    Module 2: Data Mining Fundamentals and Association Rule Mining

    Write a short note on Efficient Frequent Itemset Mining.

    (Q.9: short notes on any two of the following)

    View this question on its own page →
    Worked Solution

    Efficient Frequent Itemset Mining

    Frequent itemset mining finds sets of items that occur together in at least a minimum number of transactions (min_sup). It is the first and costliest step of association rule mining. With n items there are up to 2^n - 1 itemsets, so efficient methods are essential.

    1. Apriori (level-wise, generate-and-test)

    • Uses the Apriori property: every subset of a frequent itemset is frequent.
    • Finds L1, then generates candidates Ck from Lk-1 (join), prunes using the property, and counts support by scanning the database; repeats until no more frequent itemsets.
    • Drawbacks: many candidates and many database scans.

    2. Improvements to Apriori

    Technique Idea
    Hash-based itemset counting Hash k-itemsets into buckets; a bucket with a count below min_sup cannot contain frequent itemsets, so those candidates are dropped
    Transaction reduction A transaction with no frequent k-itemset is not needed in later scans
    Partitioning Split the database; a frequent itemset must be frequent in at least one partition; only 2 scans needed
    Sampling Mine a random sample with a lower threshold; verify on the full data
    Dynamic itemset counting Add new candidates while scanning, at checkpoints, to reduce scans

    3. FP-Growth (pattern growth, no candidate generation)

    1. Scan the database once to find frequent items and sort them in descending support.
    2. Scan again to build a compact FP-tree (a prefix tree with a header table of node links).
    3. For each frequent item, build its conditional pattern base and conditional FP-tree, and mine it recursively (divide-and-conquer).

    Advantages: only two database scans, no candidate generation, and the tree compresses the data. It is much faster than Apriori on large or dense data.

    4. Eclat (vertical data format)

    Stores each item with its transaction-ID list (TID-list). The support of an itemset is found by intersecting TID-lists, so no repeated database scans are needed.

    5. Closed and maximal itemsets

    Mining only closed or maximal frequent itemsets gives a compact summary of all frequent itemsets.

    Comparison

    Method Candidates Scans Best for
    Apriori Yes (many) One per level Small data, simple implementation
    FP-Growth No 2 Large and dense data
    Eclat Yes (via TID-lists) Few Sparse data that fits in memory

    Conclusion

    Efficiency comes from pruning with the Apriori property, reducing database scans, or avoiding candidate generation altogether, as FP-Growth does.

  28. Q9d. Write a short note on Categorization of Major Clustering Methods. _(Q.9: short notes on any two of the following)_20267m

    Module 4: Cluster Analysis

    Write a short note on Categorization of Major Clustering Methods.

    (Q.9: short notes on any two of the following)

    View this question on its own page →
    Worked Solution

    Categorization of Major Clustering Methods

    Clustering groups data objects so that objects in the same cluster are similar to each other and different from objects in other clusters. It is unsupervised learning. The major methods are grouped into five categories.

    1. Partitioning methods

    Divide n objects into k partitions (clusters), each object belonging to one cluster; the user gives k.

    • K-means: each cluster is represented by its mean (centroid); objects are repeatedly assigned to the nearest centroid.
    • K-medoids (PAM, CLARA, CLARANS): each cluster is represented by an actual object (medoid); less sensitive to outliers.
    • Good for spherical clusters of similar size and for large data; needs k.

    2. Hierarchical methods

    Build a tree of clusters (dendrogram).

    • Agglomerative (bottom-up): start with each object as a cluster and merge the closest.
    • Divisive (top-down): start with one cluster and split.
    • Linkage: single, complete, average. Variants: BIRCH, CURE, Chameleon.
    • No k needed in advance, but a merge or split cannot be undone and it is costly for big data.

    3. Density-based methods

    A cluster is a dense region of objects separated by regions of low density.

    • DBSCAN (parameters eps and MinPts), OPTICS, DENCLUE.
    • Finds arbitrary-shaped clusters and handles noise; k not needed; struggles with varying densities.

    4. Grid-based methods

    Quantize the space into a finite number of grid cells and cluster the cells.

    • STING, CLIQUE, WaveCluster.
    • Very fast: the time depends on the number of cells, not on the number of objects.

    5. Model-based methods

    Assume a mathematical model for each cluster and fit the data to it.

    • EM (Expectation-Maximization) with Gaussian mixtures, COBWEB (conceptual clustering), SOM (self-organizing maps).
    • Gives soft (probabilistic) membership; depends on the assumed model.

    Summary table

    Category Basic idea Examples Strength Weakness
    Partitioning Split into k groups, iteratively optimize K-means, K-medoids Simple, scalable Needs k, spherical shapes, outliers
    Hierarchical Tree of merges/splits AGNES, DIANA, BIRCH Dendrogram, no k Not scalable, no undo
    Density-based Dense regions DBSCAN, OPTICS Arbitrary shapes, noise Parameter sensitivity
    Grid-based Grid cells STING, CLIQUE Fast Less accurate boundaries
    Model-based Statistical model fit EM, COBWEB, SOM Soft clusters Model assumptions

    Some methods combine ideas from several categories (for example high-dimensional and constraint-based clustering).

    Conclusion

    The right method depends on data size, cluster shape, presence of noise and whether k is known.

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.