CSC420 · TU past paper
Data Warehousing and Data Mining 2079 question paper
The complete TU 2079 exam paper for Data Warehousing and Data Mining (CSC420), all 12 questions with solved model answers written to the mark scheme.
Tap a question to open its answer.
- 110 marksNumericalFinding frequent itemsetHideAnswer
Drawbacks of Apriori Algorithm and FP-Growth Analysis
Drawback 1: Generation of a huge number of candidate itemsets. Apriori generates a large number of candidate itemsets at every level. If there are $10^4$ frequent 1-itemsets, it must generate more than $10^7$ candidate 2-itemsets. To dis...
- 210 marksNumericalClassification by backpropagationHideAnswer
When Multilayer Perceptron is Better Choice Over Other Classification Algorithms
Consider a multilayer feed-forward neural network given below. Let the learning rate be 0.5. Assume initial values of weights and biases as given in the table below. Train the network for the training tuples (1, 1, 0) and (0, 1, 1), where last number is target output. Show weight and bias updates by using back-propagation algorithm. Assume that sigmoid activation function is used in the network.
$$\begin{array}{c|c|c|c|c|c|c|c|c} w_{13} & w_{14} & w_{23} & w_{24} & w_{35} & w_{45} & b_3 & b_4 & b_5 \ \hline 0.5 & 0.2 & -0.3 & 0.5 & 0.1 & 0.3 & 0.6 & -0.4 & 0.8 \ \end{array}$$
[10]
- Inputs: node 1 ($x1$), node 2 ($x2$); Hidden: nodes 3, 4; Output: node 5 - Weights: $w{13}=0.5,\ w{14}=0.2,\ w{23}=-0.3,\ w{24}=0.5,\ w{35}=0.1,\ w{45}=0.3$ - Biases: $b3=0.6,\ b4=-0.4,\ b5=0.8$ - Learning rate: $\alpha=0.5$ - Activati...
- 310 marksOLAP operation in multidimensional data moHideAnswer
Why OLAP operations are used? Discuss various OLAP operation with suitable example of each.[10]
OLAP Operations in Multidimensional Data Model
Why OLAP Operations Are Used
OLAP (Online Analytical Processing) operations are used to analyze multidimensional data stored in a data warehouse. The key reasons for using OLAP operations are:
- To view and analyze data from multiple perspectives (dimensions)
- To generate summaries and aggregations at different levels of detail
- To help managers and analysts make better business decisions
- To allow interactive exploration of data by drilling into details or rolling up to summaries
- To support fast query processing on large volumes of historical data
- To enable users to slice, filter, and pivot data without writing complex SQL queries
A multidimensional data model is organized around a central theme (e.g., Sales) represented by a fact table containing numerical measures (e.g., sales amount, units sold), and dimension tables (e.g., Time, Location, Product).
OLAP Operations
1. Roll-Up (Consolidation / Aggregation)
Definition: Roll-up generates a summary by moving from a lower level to a higher level in a concept hierarchy, or by reducing dimensions.
Two ways to perform Roll-up:
- Climbing up a concept hierarchy
- Reducing the number of dimensions
Concept Hierarchy Example (Time):
Daily --> Weekly --> Monthly --> Quarterly --> YearlyExample:
Suppose we have sales data at the city level (Kathmandu, Pokhara, Butwal). A roll-up on the Location dimension climbs from cities to countries:
Location (City) Sales Kathmandu 5000 Pokhara 3000 Butwal 2000 After Roll-up (City --> Country):
Location (Country) Sales Nepal 10000 The data is aggregated (summed) at the country level, reducing detail.
2. Drill-Down (Reverse of Roll-Up)
Definition: Drill-down is the reverse of roll-up. It navigates from a higher level summary to a lower level detail, either by stepping down a concept hierarchy or by introducing additional dimensions.
Example:
Starting from yearly sales data, a drill-down on the Time dimension moves from year to quarter:
Year Sales 2023 40000 After Drill-down (Year --> Quarter):
Quarter Sales Q1 8000 Q2 12000 Q3 10000 Q4 10000 This gives more detailed information for analysis.
3. Slice
Definition: Slice performs a selection on one dimension of the data cube, resulting in a sub-cube. It fixes one dimension to a single value and returns the remaining dimensions.
Example:
Consider a 3D cube with dimensions: Time, Location, Product.
Slicing on Time = "Q1 2023" gives a 2D sub-cube showing sales for all locations and all products only for Q1 2023:
Location \ Product TV Laptop Phone Kathmandu 2000 3000 1500 Pokhara 1000 2000 800 One dimension (Time) is fixed; the rest are free.
4. Dice
Definition: Dice performs a selection on two or more dimensions of the data cube, resulting in a smaller sub-cube. It is like applying multiple conditions simultaneously.
Example:
From the same 3D cube (Time, Location, Product), dicing with:
- Time = "Q1 2023" OR "Q2 2023"
- Location = "Kathmandu" OR "Pokhara"
- Product = "Laptop" OR "Phone"
This produces a smaller sub-cube containing only the combinations that satisfy all three conditions, rather than a single slice.
Time Location Product Sales Q1 Kathmandu Laptop 3000 Q1 Kathmandu Phone 1500 Q1 Pokhara Laptop 2000 Q2 Kathmandu Laptop 3500 ... ... ... ...
5. Pivot (Rotate)
Definition: Pivot (also called rotate) rotates the data axes to provide an alternative presentation of the data. It changes the orientation of the data cube to view it from a different angle without changing the data itself.
Example:
Original view (rows = Product, columns = Location):
Product \ Location Kathmandu Pokhara Laptop 3000 2000 Phone 1500 800 After Pivot (rows = Location, columns = Product):
Location \ Product Laptop Phone Kathmandu 3000 1500 Pokhara 2000 800 The data is the same but the perspective has changed, making it easier to analyze from a different angle.
Summary Table
Operation Description Direction Roll-Up Aggregates data from lower to higher level Bottom --> Top Drill-Down Expands data from higher to lower level Top --> Bottom Slice Selects one value for one dimension Fixes 1 dimension Dice Selects values for two or more dimensions Fixes 2+ dimensions Pivot Rotates the data cube for alternate view Changes orientation - 45 marksNumericalEfficient method for data cube computationHideAnswer
Suppose that we have 5 dimensional data. What will be total number of cuboids generated? If we consider each dimension has 5 levels, what will be the number of cuboids generated? [5]
- Number of dimensions: $n = 5$ - Number of levels per dimension (Part 2): $L = 5$ for each dimension --- For a data cube of $n$ dimensions where each dimension has no associated concept hierarchy, the total number of cuboids is: $$\text...
- 55 marksData integration and transformationHideAnswer
Why data normalization is important in data mining? Explain min-max and Z-score normalization approach. [5]
Data normalization is important in data mining for the following reasons: - Equal weight to all attributes: Without normalization, attributes with larger ranges (e.g., income: 10,000-100,000) can dominate attributes with smaller ranges (...
- 65 marksNumericalHierarchicalHideAnswer
What are two categories of hierarchical clustering? Divide the following data points into two clusters using agglomerative clustering. { (2,10), (2,5), (8,4), (5,8), (7,5), (6,4) } [5]
Hierarchical Clustering: Two Categories and Agglomerative Example
Step 1 - Extract (Given Data)
Data points to cluster:
- P1 = (2, 10)
- P2 = (2, 5)
- P3 = (8, 4)
- P4 = (5, 8)
- P5 = (7, 5)
- P6 = (6, 4)
Target: 2 clusters. Linkage method not specified; I will use single linkage (minimum distance) as is standard for this textbook problem.
Step 2 - Solve
Two Categories of Hierarchical Clustering
-
Agglomerative (Bottom-Up): Each object starts as its own cluster. At each step the two closest clusters are merged, continuing until all objects form one cluster (or the desired number is reached).
-
Divisive (Top-Down): All objects start in a single cluster, which is repeatedly split into smaller clusters until each object is alone (or the desired number is reached).
Distance Formula (Euclidean)
$$d(P_i, P_j) = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Initial Distance Matrix
P1 P2 P3 P4 P5 P6 P1 0 5.00 9.22 5.39 9.06 9.22 P2 5.00 0 6.08 4.24 5.00 4.12 P3 9.22 6.08 0 5.83 2.24 2.00 P4 5.39 4.24 5.83 0 3.61 5.00 P5 9.06 5.00 2.24 3.61 0 1.41 P6 9.22 4.12 2.00 5.00 1.41 0 Sample checks:
- $d(P5,P6)=\sqrt{1^2+1^2}=1.41$ (minimum)
- $d(P3,P6)=\sqrt{2^2+0^2}=2.00$
- $d(P3,P5)=\sqrt{1^2+1^2}=2.24$
Step A: Merge closest pair
Minimum = 1.41 (P5, P6). Merge → C1 = {P5, P6}
Clusters: {P1}, {P2}, {P3}, {P4}, {P5,P6}
Step B: Recompute (single linkage)
- $d({P5,P6},P1)=\min(9.06,9.22)=9.06$
- $d({P5,P6},P2)=\min(5.00,4.12)=4.12$
- $d({P5,P6},P3)=\min(2.24,2.00)=2.00$ ← minimum overall
- $d({P5,P6},P4)=\min(3.61,5.00)=3.61$
Merge P3 → C1 = {P3, P5, P6}
Clusters: {P1}, {P2}, {P4}, {P3,P5,P6}
Step C: Recompute
- $d({P3,P5,P6},P1)=\min(9.22,9.06,9.22)=9.06$
- $d({P3,P5,P6},P2)=\min(6.08,5.00,4.12)=4.12$
- $d({P3,P5,P6},P4)=\min(5.83,3.61,5.00)=3.61$ ← minimum overall
(Others: $d(P1,P2)=5.00,\ d(P1,P4)=5.39,\ d(P2,P4)=4.24$)
Merge P4 → C1 = {P3, P4, P5, P6}
Clusters: {P1}, {P2}, {P3,P4,P5,P6}
Step D: Recompute
- $d({P3,P4,P5,P6},P1)=\min(9.22,5.39,9.06,9.22)=5.39$
- $d({P3,P4,P5,P6},P2)=\min(6.08,4.24,5.00,4.12)=4.12$
- $d(P1,P2)=5.00$
Minimum = 4.12 (between big cluster and P2). Merge P2 → C1 = {P2, P3, P4, P5, P6}
Clusters: {P1}, {P2,P3,P4,P5,P6}
Final Result (2 clusters)
We stop when exactly two clusters remain:
$$\boxed{\text{Cluster 1} = {P1} = {(2,10)}}$$ $$\boxed{\text{Cluster 2} = {P2,P3,P4,P5,P6} = {(2,5),(8,4),(5,8),(7,5),(6,4)}}$$
Point P1 = (2,10) is the outlier that separates last, forming its own cluster; all other points group together.
- 75 marksClustering techniquesHideAnswer
Discuss the concept of K-means++ and Mini-batch K-means algorithm. [5]
--- In the standard K-means algorithm, the initial cluster centers (centroids) are chosen randomly. This random initialization leads to a problem called initialization sensitivity, where the final clusters formed depend heavily on which ...
- 85 marksEvaluating accuracyHideAnswer
What is confusion matrix? Discuss various classification measures along with their mathematical formulae. [5]
A Confusion Matrix is an N×N matrix used for evaluating the performance of a classification model, where N is the number of target classes. For a binary classification problem, we have a 2×2 matrix: Predicted: Positive Predicted: Negativ...
- 95 marksGraph mining algorithmHideAnswer
What are application areas of graph mining? Explain the concept behind inductive logic programming with suitable demonstration. [5]
--- Graph mining deals with discovering patterns, structures, and knowledge from graph-structured data. The key application areas are: Application Area Description ------ Social Network Analysis (SNA) Investigates social structures using...
- 105 marksAn introduction to text mining, natural laHideAnswer
Discuss the concept of text mining with its practical implications. [5]
Text mining (also called text data mining or knowledge discovery from text) is the process of extracting interesting and non-trivial patterns or knowledge from large collections of unstructured or semi-structured text data. It applies da...
- 115 marksData martsHideAnswer
Write down short notes on: a. Data Mart b. Market Basket Analysis [5]
--- A Data Mart is a subset of a data warehouse that is focused on a specific subject area, department, or business function (such as sales, finance, or marketing). While a data warehouse is a central repository collecting information fr...
- 125 marksData object and attribute typesHideAnswer
Discuss different types of attributes with suitable example of each. [5]
An attribute (also called a feature or variable) is a data field representing a characteristic or feature of a data object. Attributes can be of different types depending on the nature of their values. --- A nominal attribute has values ...