BIT454 · TU past paper
Data Warehousing and Data Mining 2081 question paper
The complete TU 2081 exam paper for Data Warehousing and Data Mining (BIT454), all 12 questions with solved model answers written to the mark scheme.
Tap a question to open its answer.
- 110 marksK-means algorithm and limitationsHideAnswer
List different clustering approaches. Write the algorithm of K-means algorithm. What are its limitations?[10]
Model Answer: Clustering Approaches and K-Means Algorithm
Different Clustering Approaches (3 marks)
Clustering approaches can be classified into the following main categories:
-
Partitioning Methods
- Divide data into k non-overlapping clusters
- Examples: K-means, K-medoids, PAM (Partitioning Around Medoids)
-
Hierarchical Methods
- Build a hierarchy of clusters (dendrogram)
- Agglomerative (bottom-up): Start with individual points, merge into clusters
- Divisive (top-down): Start with one cluster, split into smaller clusters
-
Density-Based Methods
- Cluster based on density of data points
- Examples: DBSCAN, OPTICS
- Can find arbitrary-shaped clusters
-
Grid-Based Methods
- Divide data space into grid cells
- Cluster based on grid structure
- Example: STING
-
Model-Based Methods
- Assume data generated from probability distribution
- Example: Gaussian Mixture Models (GMM)
K-Means Algorithm (5 marks)
Algorithm Steps:
Input: Dataset D with n objects, number of clusters k
Output: k clusters with minimum within-cluster variance
Steps:
-
Initialize: Randomly select k initial cluster centers (centroids) from the dataset or randomly in the data space.
-
Assignment Step: Assign each data point to the nearest centroid using Euclidean distance:
For each point x_i in D: d = minimum distance to any centroid Assign x_i to cluster C_j where centroid is nearest -
Update Step: Recalculate centroids as the mean of all points in each cluster:
For each cluster C_j: centroid_j = (1/|C_j|) * Σ(x_i) for all x_i in C_j -
Convergence Check: If centroids have not changed (or change is below threshold), stop. Otherwise, go to Step 2.
-
Output: Final k clusters and their centroids.
Pseudocode:
Algorithm K-Means(D, k) C = randomly select k centroids from D repeat for each point x in D do assign x to nearest centroid end for for each cluster j do update centroid_j = mean of all points in cluster j end for until centroids do not change return clusters
Limitations of K-Means (2 marks)
-
Sensitive to Initial Centroids: Different initial selections may lead to different final clusters. Algorithm may converge to local optima rather than global optimum.
-
Fixed Number of Clusters: Must specify k in advance. No automatic method to determine optimal k.
-
Assumes Spherical Clusters: Works best with roughly spherical, similarly-sized clusters. Fails with elongated or irregular cluster shapes.
-
Sensitive to Outliers: Outliers can significantly affect centroid calculation and cluster quality.
-
Computational Cost: For large datasets with many dimensions, distance calculations become expensive.
-
Equal Cluster Size Assumption: Tends to produce clusters of roughly equal size, which may not reflect actual data distribution.
-
Convergence Issues: May converge slowly or get stuck in local minima.
-
Not Suitable for Categorical Data: K-means uses Euclidean distance, designed for numerical data only.
-
- 210 marksClassification by back propagationHideAnswer
What do you understand by classification by back propagation? How is it different from Bayesian classification? Explain.[10]
Classification by Back Propagation vs Bayesian Classification
Classification by Back Propagation
Back Propagation is a supervised learning algorithm used to train artificial neural networks for classification tasks.
Key Characteristics:
-
Network Structure: Uses a multi-layer feedforward neural network with an input layer, one or more hidden layers, and an output layer.
-
Learning Mechanism:
- Forward pass: Input data propagates through the network, producing an output
- Error calculation: Compares predicted output with actual (target) output
- Backward pass: Error is propagated backward through the network
- Weight adjustment: Weights are updated using gradient descent to minimize error
-
Training Process:
- Iterative refinement of weights and biases
- Continues until convergence (error becomes acceptably small)
- Uses activation functions (sigmoid, ReLU, etc.) for non-linearity
-
Advantages:
- Can learn complex, non-linear decision boundaries
- Handles multi-class classification naturally
- No assumptions about data distribution required
Bayesian Classification
Bayesian Classification is based on Bayes' theorem and probabilistic reasoning.
Key Characteristics:
-
Theoretical Foundation: Uses conditional probability and Bayes' theorem:
P(Class|Features) = P(Features|Class) × P(Class) / P(Features) -
Approach:
- Assumes independence between features (in Naive Bayes)
- Calculates posterior probability for each class
- Assigns instance to class with highest posterior probability
-
Training: Learns probability distributions from training data (not iterative weight adjustment)
-
Advantages:
- Theoretically sound probabilistic framework
- Computationally efficient
- Works well with small datasets
Key Differences
Aspect Back Propagation Bayesian Classification Learning Type Supervised (iterative) Probabilistic inference Decision Boundary Non-linear (learned) Linear (probability-based) Assumptions None about data distribution Assumes feature independence (Naive Bayes) Computational Cost Higher (iterative training) Lower (direct calculation) Interpretability Black box (weights hard to interpret) Transparent (probability-based) Data Requirements Needs large datasets Works with smaller datasets Convergence May get stuck in local minima Guaranteed solution
Conclusion
Back propagation is a connectionist, non-probabilistic approach that learns complex patterns through iterative weight adjustment, while Bayesian classification is a statistical, probabilistic approach based on explicit probability calculations. Back propagation is more powerful for complex patterns but requires more data and computation; Bayesian methods are simpler, faster, and more interpretable but assume feature independence.
-
- 310 marksNumericalApriori algorithmHideAnswer
Generate the frequent itemset from the following data using the Apriori algorithm and find the strong association rules. Minimum Support = 60%, Minimum Confidence = 75%.
TID Items 1 {A, C, D} 2 {B, C, D} 3 {A, B, C, D} 4 {B, D} 5 {A, B, C, D} [10]
- Transactions: - T1: {A, C, D} - T2: {B, C, D} - T3: {A, B, C, D} - T4: {B, D} - T5: {A, B, C, D} - Total transactions $N = 5$ - Minimum Support = 60% → absolute count = $0.60 \times 5 = 3$ - Minimum Confidence = 75% --- Item Count Supp...
- 45 marksText mining definition and applicationsHideAnswer
What do you mean by text mining? Explain with an example. [5]
Model Answer: Text Mining
Definition
Text Mining is the process of extracting meaningful information, patterns, and knowledge from unstructured text data. It involves analyzing large volumes of textual documents to discover useful insights, relationships, and trends that would be difficult to identify manually.
Text mining combines techniques from data mining, natural language processing (NLP), machine learning, and statistics to transform raw text into structured, actionable information.
Key Characteristics
- Works with unstructured data (free-form text)
- Converts text into structured format for analysis
- Identifies patterns, trends, and relationships
- Enables knowledge discovery from documents
Example
Customer Review Analysis for an E-commerce Platform:
Suppose an online retailer receives thousands of customer reviews for their products:
"Great product, fast delivery, but packaging was poor." "Excellent quality, highly recommended!" "Poor customer service, took 2 weeks to respond."
Using text mining:
-
Extract information: Identify key topics (product quality, delivery, packaging, customer service)
-
Sentiment analysis: Classify reviews as positive, negative, or neutral
-
Pattern discovery: Find that "packaging" and "delivery time" are common complaints
-
Generate insights:
- 65% reviews mention product quality positively
- 30% complain about delivery delays
- 25% have packaging concerns
-
Action: Management can prioritize improving packaging and logistics based on these patterns
Applications
- Sentiment analysis
- Document classification
- Information extraction
- Spam detection
- Topic modeling
This demonstrates how text mining converts unstructured customer feedback into structured business intelligence.
- 55 marksSocial network analysis methodsHideAnswer
How do you carry out social network analysis? List two of its uses. [5]
Social network analysis (SNA) is conducted through the following systematic steps: - Identify the network boundaries and nodes (individuals, organizations, or entities) - Gather data on relationships/connections between nodes through sur...
- 65 marksOutlier analysis and detectionHideAnswer
Illustrate the use of outlier analysis with an example. [5]
Outlier analysis is a data mining technique used to identify and analyze data points that deviate significantly from the normal pattern or expected behavior in a dataset. Outliers are observations that are substantially different from ot...
- 75 marksNeed for data preprocessingHideAnswer
Why is data preprocessing required? Explain any two data preprocessing methods. [5]
Model Answer: Data Preprocessing
Why Data Preprocessing is Required (2 marks)
Data preprocessing is essential because:
-
Raw data quality issues: Real-world data contains inconsistencies, missing values, duplicates, and noise that can negatively impact model performance and accuracy.
-
Improved model performance: Cleaning and transforming data into a suitable format ensures that machine learning algorithms can learn patterns more effectively and make better predictions.
-
Handling incompatibilities: Raw data may be in different formats, scales, or units. Preprocessing standardizes this to make it compatible with algorithms.
-
Reduced computational cost: Removing irrelevant features and handling outliers reduces the data size and computational burden.
-
Better insights: Preprocessed data reveals meaningful patterns and relationships that would otherwise be obscured by noise and errors.
Two Data Preprocessing Methods (3 marks)
1. Data Cleaning
Data cleaning involves identifying and correcting errors and inconsistencies in the dataset:
- Handling missing values: Replace or remove records with missing data using techniques like mean imputation, forward fill, or deletion.
- Removing duplicates: Identify and eliminate duplicate records that may skew analysis.
- Correcting errors: Fix typos, inconsistent formatting, and logical errors (e.g., negative ages).
- Handling outliers: Detect and manage extreme values that don't fit the normal distribution.
Example: In a student dataset, if some age values are missing, we can fill them with the mean age of the dataset.
2. Data Normalization/Standardization
This method scales numerical features to a common range:
-
Normalization: Scales data to a range [0, 1] using the formula: $$X_{normalized} = \frac{X - X_{min}}{X_{max} - X_{min}}$$
-
Standardization: Transforms data to have mean 0 and standard deviation 1: $$X_{standardized} = \frac{X - \mu}{\sigma}$$
Purpose: Ensures that features with different scales (e.g., age in years vs. income in thousands) contribute equally to model training.
Example: If age ranges 18-80 and salary ranges 20,000-500,000, normalization brings both to [0, 1] scale for fair comparison.
-
- 85 marksOperational database vs data warehouseHideAnswer
Differentiate between data warehouse and operational database. [5]
Aspect Operational Database Data Warehouse ----------------------------------------------- Purpose Supports day-to-day business operations and transactions Supports analytical queries and decision-making Data Nature Current, real-time op...
- 95 marksData mining functionalities and tasksHideAnswer
What are the data mining functionalities? Explain. [5]
Data Mining Functionalities
Data mining functionalities refer to the types of patterns and knowledge that can be discovered from data. The main data mining functionalities are:
1. Characterization and Discrimination
- Characterization: Summarizes the general characteristics or features of objects in a target class. It provides a concise description of what the data looks like.
- Discrimination: Distinguishes between objects of different classes by comparing their characteristics. It highlights differences between target and contrasting classes.
- Example: Characterizing customers who buy frequently vs. discriminating between high-value and low-value customers.
2. Association Rule Mining
- Discovers relationships and associations between different items or attributes in the database.
- Identifies patterns like "if X occurs, then Y is likely to occur."
- Example: "Customers who buy bread often buy milk" (market basket analysis).
3. Classification
- Builds models to predict the class label of new, unseen objects based on training data.
- Maps data into predefined categories or classes.
- Example: Classifying emails as spam or not spam, or predicting whether a loan applicant is creditworthy.
4. Clustering
- Groups similar objects together without predefined class labels.
- Discovers natural groupings or clusters in the data based on similarity measures.
- Example: Segmenting customers into groups based on purchasing behavior.
5. Regression
- Predicts continuous numerical values based on historical data.
- Establishes mathematical relationships between variables.
- Example: Predicting house prices based on features like size, location, and age.
6. Outlier Detection
- Identifies unusual or anomalous objects that deviate significantly from normal patterns.
- Useful for fraud detection and quality control.
- Example: Detecting unusual credit card transactions or manufacturing defects.
These functionalities enable organizations to extract meaningful insights and make data-driven decisions.
- 105 marksOLAP technology and multidimensional analyHideAnswer
Write short notes on: (a) OLAP (b) Laplace Smoothing [5]
Definition: OLAP is a technology that enables users to quickly analyze summarized and consolidated data from a data warehouse or data mart using multidimensional views. Key Characteristics: - Supports complex analytical queries on large ...
- 115 marksBeam search mechanismHideAnswer
Define full cube. Discuss the working mechanism of beam search. [5]
Model Answer: Full Cube and Beam Search
Full Cube (Definition)
A full cube in the context of data warehousing and OLAP (Online Analytical Processing) refers to a complete multidimensional data structure where all possible combinations of dimension members are materialized and stored with their corresponding aggregate values.
Key characteristics:
- Contains pre-computed aggregations for every possible combination of dimension levels
- Provides the fastest query response times since all results are pre-calculated
- Requires maximum storage space and longest computation time during cube construction
- Enables instant retrieval of any aggregated data without further computation
Beam Search: Working Mechanism
Beam search is a heuristic search algorithm that explores a solution space by maintaining a limited set of the most promising candidates at each step.
How it works:
-
Initialization: Start with the initial state (root node)
-
Expansion: At each level, generate all successor states (child nodes) from the current set of states
-
Evaluation: Evaluate each successor using a heuristic function (e.g., f(n) = g(n) + h(n))
-
Selection: Keep only the top-k most promising states (where k is the beam width) based on heuristic scores
-
Pruning: Discard all other states to limit memory and computation
-
Iteration: Repeat steps 2-5 until reaching a goal state or maximum depth
Advantages:
- More memory-efficient than breadth-first search
- Faster than exhaustive search methods
- Practical for large search spaces
Disadvantages:
- May miss optimal solution if pruned prematurely
- Quality depends on heuristic function accuracy
- Beam width selection is critical
Example: In machine translation, beam search keeps top-5 most likely word sequences at each step rather than exploring all possibilities.
- 125 marksData warehouse conceptual modeling techniqHideAnswer
Explain any two conceptual modeling techniques of data warehousing. [5]
Conceptual modeling in data warehousing involves designing the logical structure of data to support analytical queries and decision-making. Two major techniques are: --- Definition: The star schema is a denormalized database design where...