Chapter 4
Data Warehousing and Data Mining
TU BIM past exam questions
Past questions and answers
22 questions set from this chapter. Most repeated first.
- 2025 AD Model · 1 mark
List any two types of knowledge.
Answer
Two types of knowledge are declarative knowledge (facts, what is true) and procedural knowledge (how to do something, rules and procedures). Others include structural and heuristic knowledge.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 1 mark
Define data warehousing.
Answer
Data warehousing is the process of collecting, integrating, cleaning and storing data from multiple sources in a central repository organised by subject and time, to support analysis and decision making rather than daily transactions.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 1 mark
How do you evaluate the accuracy of clustering?
Answer
Clustering accuracy is evaluated by internal measures, which use only the data (e.g. silhouette coefficient, Davies-Bouldin index, cohesion and separation), and external measures, which compare with known class labels (e.g. purity, Rand index, F-measure).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 1 mark
List any two approaches for outlier detection.
Answer
Two approaches are statistical (model-based) methods, which flag objects that deviate from an assumed distribution, and distance-based (or density-based) methods, which flag objects that are far from, or have few, neighbours. Others: clustering-based and proximity-based.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 1 mark
What is frequent pattern?
Answer
A frequent pattern is a pattern (itemset, subsequence or substructure) that appears in a data set with frequency at least a user-given minimum support threshold, e.g. milk and bread bought together often in transactions.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 1 mark
Define lazy learner.
Answer
A lazy learner simply stores the training data and delays building a model until a query arrives; it classifies by comparing the new tuple with stored ones. Training is fast but prediction is slow. Example: k-nearest neighbour.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 1 mark
Why k-Means algorithm is sensitive to outlier?
Answer
K-means uses the mean of a cluster as its centre and minimises the squared distance. An outlier with an extreme value pulls the mean towards itself, shifting the centroid and distorting the cluster shape and membership.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 1 mark
What are the techniques to improve classification accuracy?
Answer
Accuracy can be improved with ensemble methods such as bagging, boosting (AdaBoost) and random forests, which combine multiple classifiers. Other methods: better data preprocessing and feature selection, parameter tuning and cross-validation.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 1 mark
How do you take benefits from outlier?
Answer
Outliers are not always noise: studying them helps in applications like fraud detection (credit card misuse), intrusion detection, fault detection and medical diagnosis, where the rare objects themselves are the interesting events.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 1 mark
Define data cube.
Answer
A data cube is a multidimensional data structure that stores aggregated measures (e.g. sales) along several dimensions (e.g. time, item, location), allowing OLAP operations such as roll-up, drill-down and slice-dice.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 3 marks
Discuss some data transformation techniques.
Answer
Data transformation converts data into forms suitable for mining. Common techniques:
- Smoothing: removes noise using binning, regression or clustering.
- Aggregation: summarises data, e.g. daily sales into monthly totals.
- Generalization: replaces low-level data by higher-level concepts using a hierarchy (city to country).
- Normalization: scales attributes to a small range. Min-max: ; z-score: ; decimal scaling.
- Attribute construction: builds new attributes from existing ones.
- Discretization: converts numeric values into intervals or labels.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 3 marks
Describe the components of data warehouse.
Answer
Main components of a data warehouse:
- Data sources: operational databases, flat files and external sources feeding the warehouse.
- ETL tools (Extract, Transform, Load): extract data from sources, clean and transform it, and load it into the warehouse.
- Data warehouse database (central repository): stores the integrated, subject-oriented, time-variant data, along with data marts and metadata.
- Metadata: data about data, such as definitions, structure, mappings and rules.
- Access/front-end tools: query and reporting tools, OLAP, data mining and dashboards used by analysts.
- Warehouse management/ monitoring: security, backup and administration.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 3 marks
Define hyper plane, support vectors and its roles in linear classifier.
Answer
Hyperplane: a decision boundary that separates data of different classes in an n-dimensional space. It is a flat subspace of dimension , defined by (a line in 2D, a plane in 3D).
Support vectors: the training points closest to the hyperplane, lying on the margin boundaries . They alone determine the position and orientation of the hyperplane; removing other points changes nothing.
Role in a linear classifier (SVM): the classifier chooses the hyperplane that maximises the margin, , between the two classes, and a new point is classified by the sign of . A larger margin gives better generalisation.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 3 marks
Write the algorithm for k - Means algorithm.
Answer
k-Means algorithm (partitioning clustering)
Input: dataset of objects, number of clusters . Output: clusters.
- Randomly choose objects from as the initial cluster centres (centroids).
- Assign: for every object, compute its distance (usually Euclidean) to each centroid and assign it to the nearest one.
- Update: recompute each centroid as the mean of all objects currently in its cluster:
- Repeat steps 2 and 3 until the assignments no longer change (centroids stop moving) or a maximum number of iterations is reached.
The algorithm minimises the sum of squared errors . It is simple and fast but sensitive to the initial centroids and to outliers, and must be given in advance.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 3 marks
How do you detect outlier based on proximity based approach?
Answer
Proximity-based outlier detection assumes that an object is an outlier if its nearest neighbours are far away, i.e. its proximity to the rest of the data is significantly different from that of most objects.
There are two main approaches:
- Distance-based: an object is a outlier if fewer than a fraction of the objects lie within distance of it. Alternatively, rank objects by the distance to their -th nearest neighbour (or average distance to neighbours); the objects with the largest scores are outliers.
- Density-based: the local density around an object is compared with the density around its neighbours (for example the Local Outlier Factor, LOF). An object whose density is much lower than that of its neighbours has a high LOF and is declared an outlier.
Steps: choose a distance measure and (or ), compute each object's score, then flag objects whose score exceeds a threshold or take the top- scores. Density-based methods handle datasets with clusters of different density better than plain distance-based methods.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 3 marks
What is closed item set? What are the types of association rules?
Answer
Closed itemset: an itemset is closed in a dataset if it is frequent and there is no proper superset with the same support count as . Closed itemsets give a compact, lossless representation of all frequent itemsets (supports of all frequent itemsets can be derived from them).
Types of association rules:
- Based on the types of values: Boolean association rules (presence/absence of items) and quantitative association rules (numeric attributes, e.g. age(30..39) buys(laptop)).
- Based on dimensions: single-dimensional rules (one predicate, e.g. buys) and multi-dimensional rules (several predicates such as age, income, buys).
- Based on levels of abstraction: single-level and multilevel rules (e.g. milk bread vs. skim milk wheat bread).
- Based on kinds of patterns: frequent-itemset-based rules, sequential, and correlation rules.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 5 marks
How reconstruction based outlier detection methods used auto encoder? Describe in brief.
Answer
Reconstruction-based methods assume that normal data have structure that can be compressed and reconstructed accurately, while outliers do not follow this structure and are reconstructed poorly.
Autoencoder is a neural network trained to reproduce its input. It has:
- an encoder that maps input to a low-dimensional latent code (the bottleneck), and
- a decoder that reconstructs from .
Working:
- Train the autoencoder on the (mostly normal) data by minimising the reconstruction error
- Because the bottleneck is small, the network learns only the dominant patterns of normal data.
- For each object compute the reconstruction error and use it as the outlier score.
- Objects whose error is above a threshold (for example mean plus 3 standard deviations, or the top few percent) are declared outliers.
Normal points are reconstructed with small error; anomalous points, being unlike the training patterns, give large error. The method works without labels (unsupervised) and handles high-dimensional data, but training data should be mostly free of outliers.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 5 marks
Why do we need to clean the data and how do you clean the data? Explain.
Answer
Why clean the data?
Real-world data is dirty: incomplete (missing values), noisy (errors, outliers) and inconsistent (different formats, duplicates, conflicting values). Poor-quality data gives poor mining results ("garbage in, garbage out"), misleading patterns, and inaccurate models. Cleaning improves accuracy, consistency and the reliability of decisions.
How to clean data:
- Handling missing values
- Ignore/delete the tuple (when many attributes are missing).
- Fill manually.
- Fill with a global constant (e.g. "Unknown").
- Fill with the attribute mean or median (or the class-wise mean).
- Fill with the most probable value using regression, decision tree or Bayesian inference.
- Handling noisy data
- Binning: sort values, divide into bins and smooth by bin means, medians or boundaries.
- Regression: fit the data to a function and smooth.
- Clustering / outlier analysis: detect and remove values lying outside clusters.
- Resolving inconsistencies and duplicates: correct typing errors, standardise formats and units (e.g. date formats), use constraints or reference data, and remove duplicate records.
Cleaning is an iterative process: detect discrepancies, apply transformations to correct them, and re-check.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 5 marks
Generate the frequent item set using FP Growth approach.
TID Items
T10 {A, B, C , E}
T20 {B, D, E, F}
T30 {A, B, C, D, F, G}
T40 {A, B, C, D, E, G, H}
T50 {A, C, D, E, H}
TID Items
T10 {A, B, C , E}
T20 {B, D, E, F}
T30 {A, B, C, D, F, G}
T40 {A, B, C, D, E, G, H}
T50 {A, C, D, E, H}
Answer
The minimum support is not given, so assume a minimum support count of 3 (60% of 5 transactions).
Step 1: Item counts
A = 4, B = 4, C = 4, D = 4, E = 4, F = 2, G = 2, H = 2.
F, G and H are infrequent and are removed. The remaining items all have equal support, so they are ordered alphabetically: A, B, C, D, E.
Step 2: Ordered transactions
| TID | Frequent items |
|---|---|
| T10 | A, B, C, E |
| T20 | B, D, E |
| T30 | A, B, C, D |
| T40 | A, B, C, D, E |
| T50 | A, C, D, E |
Step 3: FP-tree (item:count)
null
├─ A:4
│ ├─ B:3
│ │ └─ C:3
│ │ ├─ E:1
│ │ └─ D:2
│ │ └─ E:1
│ └─ C:1
│ └─ D:1
│ └─ E:1
└─ B:1
└─ D:1
└─ E:1
Step 4: Conditional pattern bases and frequent patterns (processing from the least frequent item upwards)
| Item | Conditional pattern base | Conditional FP-tree | Frequent patterns |
|---|---|---|---|
| E | {ABC:1}, {ABCD:1}, {ACD:1}, {BD:1} | A:3, B:3, C:3, D:3 (then only AC reaches 3) | E:4, AE:3, BE:3, CE:3, DE:3, ACE:3 |
| D | {ABC:2}, {AC:1} | A:3, C:3 | D:4, AD:3, CD:3, ACD:3 |
| C | {AB:3}, {A:1} | A:4, B:3 | C:4, AC:4, BC:3, ABC:3 |
| B | {A:3} | A:3 | B:4, AB:3 |
| A | none | none | A:4 |
Check for E: within its conditional base, AB = 2, AD = 2, BC = 2, BD = 2, CD = 2, all below 3, so only AC is added.
Frequent itemsets (support count ):
- 1-itemsets: A, B, C, D, E
- 2-itemsets: AB, AC, AD, AE, BC, BD, BE, CD, CE, DE
- 3-itemsets: ABC, ACD, ACE
There are no frequent 4-itemsets.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 5 marks
Explain the types of OLAP operations.
Answer
OLAP (Online Analytical Processing) operations let users view and analyse multidimensional data (a data cube) interactively. The main operations are:
- Roll-up (drill-up): aggregates data by climbing up a concept hierarchy or by reducing dimensions. Example: city country, or month quarter, giving totals at a higher level.
- Drill-down: the reverse of roll-up; moves from summarised data to more detailed data by going down a hierarchy or adding a dimension. Example: quarter month day.
- Slice: selects a single value on one dimension, producing a sub-cube of one lower dimension. Example: sales for time = "Q1" only.
- Dice: selects values on two or more dimensions, giving a smaller sub-cube. Example: time = Q1 or Q2, location = Kathmandu or Pokhara, item = "mobile".
- Pivot (rotate): rotates the axes of the cube to give an alternative view of the data, such as swapping rows and columns of a report.
Other operations include drill-across (querying more than one fact table) and drill-through (going down to the back-end relational tables).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 10 marks
List and describe in brief about the different evaluation metrics for evaluating classifiers. How decision is created? Illustrate with an example. [4 + 6]
Answer
Evaluation metrics for classifiers
They are computed from the confusion matrix:
| Predicted positive | Predicted negative | |
|---|---|---|
| Actual positive | TP | FN |
| Actual negative | FP | TN |
- Accuracy : fraction of correct predictions. Error rate accuracy.
- Precision : of the predicted positives, how many are truly positive.
- Recall (sensitivity) : of the actual positives, how many are found.
- Specificity : proportion of actual negatives correctly identified.
- F1-score : harmonic mean of precision and recall.
- ROC curve / AUC: plot of true positive rate against false positive rate at different thresholds; the larger the area, the better the classifier.
Example: TP = 40, FN = 10, FP = 5, TN = 45 gives accuracy , precision , recall , specificity , F1 .
How a decision is created (decision tree)
A decision tree classifier builds a tree top-down. At each node the attribute giving the best split (highest information gain) is chosen; the data is partitioned by its values and the process repeats until a node is pure or no attributes remain. A new tuple follows the tests from the root to a leaf, and the leaf's class label is the decision.
Example (14 days of the "play tennis" data, 9 Yes and 5 No):
Splitting on Outlook: Sunny (2 Yes, 3 No) has entropy 0.971; Overcast (4 Yes, 0 No) has 0; Rain (3 Yes, 2 No) has 0.971.
This is the highest gain among the attributes, so Outlook becomes the root. The Overcast branch is a pure leaf (Yes); the Sunny and Rain branches are split further (for example by Humidity and Wind). A tuple with Outlook = Overcast is therefore classified as "Play = Yes".
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 AD Model · 10 marks
Differentiate between partitioning and hierarchical clustering approach. Given the points A(4, 8), B(5, 7), C(6, 6), D(7, 5), E(8, 4), F(7, 3), G(8, 3) and H(9, 5), apply DBSCAN to perform clustering. [3 + 7]
Answer
Partitioning vs. hierarchical clustering
| Partitioning | Hierarchical |
|---|---|
| Divides objects into flat, non-overlapping clusters | Builds a tree of clusters (dendrogram) |
| must be specified in advance | need not be given; cut the dendrogram at any level |
| Iterative relocation to optimise a criterion | Agglomerative (merge) or divisive (split); merges cannot be undone |
| Examples: k-means, k-medoids | Examples: AGNES, DIANA, BIRCH |
| Efficient for large data, usually spherical clusters | Higher cost (at least ), shows structure at all levels |
DBSCAN on the given points
The values of and MinPts are not given, so assume and MinPts (counting the point itself), with Euclidean distance.
Points: A(4,8), B(5,7), C(6,6), D(7,5), E(8,4), F(7,3), G(8,3), H(9,5).
Relevant distances: AB = BC = CD = DE = EF = EH = ; EG = FG = 1. Other pairs are larger, for example DF = DH = 2, DG = GH = , AC = .
-neighbourhoods:
| Point | Neighbours within 1.5 | Size | Type |
|---|---|---|---|
| A | A, B | 2 | border |
| B | A, B, C | 3 | core |
| C | B, C, D | 3 | core |
| D | C, D, E | 3 | core |
| E | D, E, F, G, H | 5 | core |
| F | E, F, G | 3 | core |
| G | E, F, G | 3 | core |
| H | E, H | 2 | border |
Clustering: start at A: it has only 2 points in its neighbourhood, so it is tentatively noise. Take B (core) and start cluster 1 with {A, B, C}; A is now reached as a border point. Expand from C (core), adding D; from D adding E; from E adding F, G, H; F and G are core but add nothing new, and H is a border point.
Result: one cluster and no noise points. The core points are B, C, D, E, F, G and the border points are A and H. (With a smaller such as 1.2, the chain breaks and most points become noise, which shows how sensitive DBSCAN is to its parameters.)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
Questions from TU BIM Seventh Semester IT 271 Networking System Administration Model Question 2025 (Faculty of Management model question 2025, BIM seventh semester, via EducateNepal), TU BIM Seventh Semester IT 272 Mobile Application Development Model Question 2025 (Faculty of Management model question 2025, BIM seventh semester, via EducateNepal), TU BIM Seventh Semester IT 273 Multimedia System Application Model Question 2025 (Faculty of Management model question 2025, BIM seventh semester, via EducateNepal), TU BIM Seventh Semester IT 274 Data Warehousing and Data Mining Model Question 2025 (Faculty of Management model question 2025, BIM seventh semester, via EducateNepal) and TU BIM Seventh Semester IT 247 E-Commerce and Internet Marketing Model Question 2025 (Faculty of Management model question 2025, BIM seventh semester, via EducateNepal). Answers are written for this site; check them against your class notes.