Skip to main content

Chapter 3

Data Warehousing and Data Mining

TU BIT past exam questions

Past questions and answers

24 questions set from this chapter. Most repeated first.

  • 2081 · 10 marks

List different clustering approaches. Write the algorithm of K-means algorithm. What are its limitations?

Answer

Clustering approaches

  1. Partitioning methods: K-means, K-medoids (PAM), CLARA, CLARANS.
  2. Hierarchical methods: agglomerative (AGNES), divisive (DIANA), BIRCH, CURE, Chameleon.
  3. Density-based methods: DBSCAN, OPTICS, DENCLUE.
  4. Grid-based methods: STING, CLIQUE, WaveCluster.
  5. Model-based methods: EM / Gaussian mixture, COBWEB, SOM.

K-means algorithm

Input: kk (number of clusters) and a dataset of nn objects. Output: kk clusters.

  1. Arbitrarily choose kk objects as initial cluster centres (means).
  2. Repeat:
    1. Assign each object to the cluster whose mean is nearest, using distance d(x,mi)=∑j(xj−mij)2d(x,m_i)=\sqrt{\sum_j (x_j-m_{ij})^2}.
    2. Recompute each cluster mean as the average of objects assigned to it.
  3. Until assignments no longer change (or the squared-error criterion E=∑i=1k∑x∈Ci∣x−mi∣2E=\sum_{i=1}^{k}\sum_{x\in C_i}|x-m_i|^2 converges).

Complexity is O(nkt)O(nkt) for tt iterations.

Limitations

  • The number of clusters kk must be specified in advance.
  • Result depends on the initial centres and may converge to a local optimum.
  • Works only where a mean is defined; unsuitable for categorical data.
  • Sensitive to noise and outliers because the mean is distorted.
  • Finds only spherical, similar-sized clusters; fails on arbitrarily shaped or density-varying clusters.
  • Not scalable well for very high-dimensional data.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 10 marks

What do you understand by classification by back propagation? How is it different from Bayesian classification? Explain.

Answer

Classification by backpropagation

Backpropagation is a neural network learning algorithm used for classification. A multilayer feed-forward network has an input layer (one unit per attribute), one or more hidden layers and an output layer (one unit per class). Each connection has a weight, and each unit has a bias and an activation (usually sigmoid, f(x)=1/(1+e−x)f(x)=1/(1+e^{-x})).

Algorithm

  1. Initialize weights and biases with small random numbers.
  2. For each training tuple:
    • Forward pass: input is propagated, computing each unit's output Oj=f(∑iwijOi+θj)O_j=f(\sum_i w_{ij}O_i+\theta_j).
    • Backward pass: compute error. For output units Errj=Oj(1−Oj)(Tj−Oj)Err_j=O_j(1-O_j)(T_j-O_j); for hidden units Errj=Oj(1−Oj)∑kErrkwjkErr_j=O_j(1-O_j)\sum_k Err_k w_{jk}.
    • Update: wij=wij+l⋅Errj⋅Oiw_{ij}=w_{ij}+l\cdot Err_j\cdot O_i and θj=θj+l⋅Errj\theta_j=\theta_j+l\cdot Err_j, where ll is learning rate.
  3. Repeat over epochs until the error is small or accuracy is acceptable.

It handles noisy data and learns complex nonlinear patterns, but training is slow and the result is hard to interpret.

Difference from Bayesian classification

BasisBackpropagationBayesian classification
BasisNeural network, minimizes error by gradient descentProbabilistic, uses Bayes theorem P(C∣X)=P(X∣C)P(C)P(X)P(C\mid X)=\frac{P(X\mid C)P(C)}{P(X)}
LearningIterative, many epochsSingle pass to estimate probabilities
Training timeLongShort
InterpretabilityPoor (black box)Good, probabilities explainable
AssumptionsNone about attribute independenceNaive Bayes assumes class-conditional independence
OutputClass from output unitClass with maximum posterior probability
ParametersNetwork topology, learning ratePrior and conditional probabilities

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 10 marks

Generate the frequent itemset from the following data using the Apriori algorithm and find the strong association rules. Minimum Support = 60%, Minimum Confidence = 75%. Transactions: 1 {A, C, D}; 2 {B, C, D}; 3 {A, B, C, D}; 4 {B, D}; 5 {A, B, C, D}.

Answer

Total transactions =5=5. Minimum support =60%×5=3=60\%\times5=3 transactions.

C1 and L1 (counts): A=3, B=4, C=4, D=5. All are ≥3\ge 3, so L1={A,B,C,D}L_1=\{A,B,C,D\}.

C2 and L2:

ItemsetCountFrequent
AB2No
AC3Yes
AD3Yes
BC3Yes
BD4Yes
CD4Yes

L2={AC,AD,BC,BD,CD}L_2=\{AC, AD, BC, BD, CD\}.

C3 and L3: joining gives ACD, BCD (ABC, ABD are pruned because AB is infrequent). Counts: ACD=3 (T1, T3, T5), BCD=3 (T2, T3, T5). Both are frequent, so L3={ACD,BCD}L_3=\{ACD, BCD\}. No 4-itemset can be generated (ABCD contains infrequent AB).

Association rules (confidence =support(X∪Y)/support(X)=\text{support(X∪Y)}/\text{support(X)}, minimum 75%):

From ACD (3):

  • A → CD: 3/3 = 100% (strong)
  • C → AD: 3/4 = 75% (strong)
  • D → AC: 3/5 = 60% (no)
  • AC → D: 3/3 = 100% (strong)
  • AD → C: 3/3 = 100% (strong)
  • CD → A: 3/4 = 75% (strong)

From BCD (3):

  • B → CD: 3/4 = 75% (strong)
  • C → BD: 3/4 = 75% (strong)
  • D → BC: 3/5 = 60% (no)
  • BC → D: 3/3 = 100% (strong)
  • BD → C: 3/4 = 75% (strong)
  • CD → B: 3/4 = 75% (strong)

From 2-itemsets:

  • A → C 100%, C → A 75%, A → D 100%, D → A 60% (no)
  • B → C 75%, C → B 75%
  • B → D 100%, D → B 80%
  • C → D 100%, D → C 80%

All rules marked strong satisfy support ≥60%\ge60\% and confidence ≥75%\ge75\%.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

What do you mean by text mining? Explain with an example.

Answer

Text mining (text data mining) is the process of extracting useful, previously unknown patterns and knowledge from large collections of unstructured text such as documents, e-mails, news, web pages and social media posts.

Typical steps

  1. Collect documents.
  2. Preprocess: tokenization, stop-word removal, stemming, lowercasing.
  3. Represent text, e.g. as a term-frequency / TF-IDF vector, tfidf(t,d)=tf(t,d)×log⁡Ndf(t)tfidf(t,d)=tf(t,d)\times\log\frac{N}{df(t)}.
  4. Apply mining techniques: classification, clustering, association, summarization, sentiment analysis, information extraction.
  5. Interpret and evaluate results.

Example: A telecom company collects thousands of customer reviews and tweets. After preprocessing, a classifier labels each as positive, negative or neutral (sentiment analysis); frequent words in negative reviews such as "slow" and "network" show that internet speed is the main complaint. Other uses include spam filtering, news categorization and document clustering.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

How do you carry out social network analysis? List two of its uses.

Answer

Social network analysis (SNA) studies relationships among entities (people, organizations, web pages) represented as a graph, where nodes are actors and edges are links such as friendship, follows or messages.

Steps

  1. Collect data on actors and relations (social media, e-mail, surveys).
  2. Build the graph (directed/undirected, weighted), stored as adjacency matrix or list.
  3. Compute measures:
    • Degree centrality: number of links of a node.
    • Betweenness centrality: how often a node lies on shortest paths.
    • Closeness centrality: average distance to other nodes.
    • Density, clustering coefficient and path length.
  4. Detect communities / clusters and key influencers.
  5. Visualize and interpret results.

Uses

  • Identifying influential people for marketing and spread of information.
  • Detecting terrorist or fraud groups, and recommending friends or products.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Illustrate the use of outlier analysis with an example.

Answer

An outlier is a data object that deviates significantly from the rest of the data, as if generated by a different mechanism. Outlier analysis (anomaly detection) identifies such objects, which may be errors (noise) or genuinely interesting events.

Methods: statistical (assume a distribution, flag values far from the mean, e.g. ∣z∣>3|z|>3 where z=(x−μ)/σz=(x-\mu)/\sigma), distance-based, density-based and clustering-based.

Example 1 (fraud detection): A customer normally spends Rs 2,000 to 5,000 per transaction with a credit card in Kathmandu. A sudden purchase of Rs 500,000 abroad deviates strongly and is flagged as a possible fraud.

Example 2: In student marks {55, 60, 58, 62, 57, 59, 5}, the mark 5 lies far from the cluster and is an outlier, perhaps a data entry error.

Other uses are intrusion detection, medical diagnosis and fault detection.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Why is data preprocessing required? Explain any two data preprocessing methods.

Answer

Why preprocessing is required

Real-world data is dirty. It may be incomplete (missing values), noisy (errors, outliers), inconsistent (different codes or units) and redundant, or too large. Poor quality data gives poor mining results ("garbage in, garbage out"). Preprocessing improves quality, accuracy and efficiency of mining.

Two methods

  1. Data cleaning:

    • Missing values: ignore the tuple, fill manually, use a global constant, attribute mean, or the most probable value.
    • Noisy data: binning (smooth by bin means or boundaries), regression, clustering to detect outliers.
    • Inconsistencies are corrected and duplicates removed.
  2. Data normalization (transformation): scale attribute values into a common range.

    • Min-max: v′=v−min⁡max⁡−min⁡(new_max−new_min)+new_minv'=\dfrac{v-\min}{\max-\min}(new\_max-new\_min)+new\_min
    • Z-score: v′=v−μσv'=\dfrac{v-\mu}{\sigma}

Other methods are data integration, data reduction and discretization.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Differentiate between data warehouse and operational database.

Answer

BasisData warehouseOperational database
PurposeAnalysis and decision support (OLAP)Day-to-day transactions (OLTP)
UsersManagers, analysts, executivesClerks, operators, clients
DataHistorical, summarized, integrated from many sourcesCurrent, detailed, application specific
OrientationSubject oriented (sales, customer)Application/process oriented
DesignDenormalized, star/snowflake schemaNormalized, ER model
OperationsMostly read, complex queriesFrequent read/write/update, short transactions
SizeVery large (terabytes)Smaller (megabytes to gigabytes)
Time horizon5 to 10 years60 to 90 days
UpdatePeriodic bulk load, non-volatileContinuous updates
Performance metricQuery throughput and responseTransaction throughput

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

What are the data mining functionalities? Explain.

Answer

Data mining functionalities specify the kinds of patterns that can be discovered. They fall into two broad groups: descriptive (characterise the general properties of the data) and predictive (use current data to make predictions).

1. Class/concept description: Summarises a class or concept in concise terms. Data characterization summarises the general features of a target class (e.g. customers who spend over Rs 50,000 a year). Data discrimination compares the target class with one or more contrasting classes.

2. Frequent patterns, association and correlation: Finds itemsets, subsequences or substructures that occur often. Association rules such as buys(milk)⇒buys(bread)\text{buys(milk)} \Rightarrow \text{buys(bread)} [support = 5%, confidence = 70%] are mined, and correlation analysis checks whether the associations are statistically meaningful.

3. Classification and prediction: Builds a model (decision tree, Naive Bayes, neural network, SVM) from training data with known class labels, then uses it to predict the class of new objects. Prediction estimates a continuous value (regression).

4. Cluster analysis: Groups objects into clusters without class labels, so that intra-cluster similarity is high and inter-cluster similarity is low (e.g. customer segmentation).

5. Outlier analysis: Detects objects that do not follow the general behaviour of the data. These may be noise, or may be useful, as in fraud detection.

6. Evolution and trend analysis: Describes regularities or trends of objects whose behaviour changes over time, such as time-series and sequential pattern analysis and stock-price movement.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Write short notes on: (a) OLAP (b) Laplace Smoothing

Answer

(a) OLAP (Online Analytical Processing)

OLAP is a technology that lets users analyse multidimensional data interactively, from different viewpoints, using a data warehouse organised as a data cube. It supports decision-making with fast, complex queries over large historical data.

Main OLAP operations:

  • Roll-up (drill-up): aggregate data by climbing a concept hierarchy or reducing dimensions (city to country).
  • Drill-down: the reverse, moving to more detailed data (year to quarter to month).
  • Slice: select one value of one dimension, giving a sub-cube.
  • Dice: select values on two or more dimensions.
  • Pivot (rotate): rotate the axes to give another view.

OLAP servers can be ROLAP (relational), MOLAP (array-based) or HOLAP (hybrid). OLAP differs from OLTP, which handles day-to-day transactions.

(b) Laplace Smoothing

In Naive Bayes classification, the posterior is a product of conditional probabilities P(xi∣C)P(x_i \mid C). If an attribute value never occurs with some class in the training data, its estimate is 00 and the whole product becomes 00 (the zero-probability problem).

Laplace smoothing (add-one correction) adds 11 to each count:

P(xi∣C)=nic+1nc+kP(x_i \mid C)=\frac{n_{ic}+1}{n_c+k}

where nicn_{ic} is the number of tuples of class CC with value xix_i, ncn_c the number of tuples of class CC, and kk the number of distinct values of the attribute. For example, with 1000 tuples having income = low 0, medium 990, high 10, the corrected counts are 1, 991, 11 over 1003. The probabilities stay close to the originals but none is zero.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Define full cube. Discuss the working mechanism of beam search.

Answer

Full cube

A full cube is a data cube in which all cuboids (every group-by combination of dimensions, 2n2^n for nn dimensions without hierarchies) are fully materialised, with every non-empty cell computed and stored. It gives fast query answers but needs very large storage, because the number of cells grows exponentially with the number of dimensions. For example, with dimensions A,B,CA,B,C the full cube has the 8 cuboids ABC,AB,AC,BC,A,B,CABC, AB, AC, BC, A, B, C and the apex (all).

Beam search

Beam search is a heuristic search used for rule/pattern generation (for example in rule-based classifiers and top-kk pruning in cube mining). It is a limited version of breadth-first search, and it avoids exhaustive search.

Working mechanism:

  1. Start with the most general hypothesis (empty rule or root node).
  2. Generate all possible refinements of the current candidates (for example add one attribute test or move one level down).
  3. Score every candidate with an evaluation function (accuracy, information gain, interest).
  4. Keep only the best kk candidates, where kk is the beam width, and discard the rest.
  5. Repeat steps 2 to 4 with the retained candidates until no improvement or a stopping condition is reached.
  6. Return the best candidate found.

It uses far less time and memory than full breadth-first search. The cost is that it is not guaranteed to find the global optimum, since a good path may be pruned. With k=1k=1 it becomes greedy hill climbing.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Explain any two conceptual modeling techniques of data warehousing.

Answer

Conceptual modelling of a data warehouse describes the multidimensional structure of the data, using dimension tables and a central fact table. The main techniques are the star, snowflake and fact constellation schemas.

1. Star schema

  • It has one large central fact table holding measures (e.g. units_sold, dollars_sold) and foreign keys to the dimensions.
  • Around it are one dimension table per dimension (time, item, branch, location), each de-normalised and containing all levels of its hierarchy.
  • The diagram looks like a star. Queries need few joins and run fast, but there is redundancy in the dimension tables.

2. Snowflake schema

  • A variant of the star schema in which dimension tables are normalised into further tables. For example, the location dimension splits into location and city/state/country tables.
  • It reduces redundancy and saves space and is easy to maintain, but it needs more joins, so queries are slower and the structure is more complex.

Fact constellation (galaxy) schema is a third technique: several fact tables share dimension tables, so it models multiple related subjects such as sales and shipping.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 3+7 marks

List some of the data mining goals. Explain the components of data warehouse.

Answer

Data mining goals

  • Description: find human-interpretable patterns that describe the data, such as clusters and associations.
  • Prediction: use known data to predict unknown or future values, such as class labels or sales.
  • Classification: assign objects to predefined classes.
  • Clustering/segmentation: group similar objects with no predefined labels.
  • Association discovery: find items that occur together.
  • Outlier/anomaly detection: detect unusual records such as fraud.
  • Trend and deviation analysis: study how data change over time.

Components of a data warehouse

A data warehouse is a subject-oriented, integrated, time-variant and non-volatile collection of data supporting management decisions. Its components are:

  1. Data sources: operational databases, flat files, external data and legacy systems that supply the raw data.
  2. ETL / data staging area: the tools that extract data from the sources, transform it (clean, integrate, convert formats, resolve inconsistencies) and load it into the warehouse, with periodic refresh.
  3. Data warehouse database (central repository): the large database that stores the integrated, summarised and detailed historical data, usually organised multidimensionally as a star or snowflake schema.
  4. Metadata repository: data about data, covering the warehouse structure and schema, source mappings, transformation rules, definitions, hierarchies and usage and access information.
  5. Data marts: smaller subject-specific subsets of the warehouse for a department (sales, finance).
  6. OLAP server: (ROLAP, MOLAP or HOLAP) presents the data multidimensionally and supports roll-up, drill-down, slice and dice.
  7. Front-end/client tools: query and reporting tools, analysis tools and data mining tools used by end users.
  8. Management and administration tools: monitor, secure, back up and manage the warehouse.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 4+6 marks

What is the concept behind market basket analysis? How do you generate frequent item sets using Apriori algorithm? Explain.

Answer

Market basket analysis

Market basket analysis finds associations between items that customers buy together in the same transaction. If customers who buy item A tend also to buy item B, this is written as the rule A⇒BA \Rightarrow B. The results are used for shelf placement, cross-selling, promotions and catalogue design. For example, {bread}⇒{butter}\{\text{bread}\} \Rightarrow \{\text{butter}\}.

Two measures define a rule:

support(A⇒B)=transactions containing A∪Btotal transactions,confidence(A⇒B)=support(A∪B)support(A)\text{support}(A\Rightarrow B)=\frac{\text{transactions containing }A\cup B}{\text{total transactions}},\qquad \text{confidence}(A\Rightarrow B)=\frac{\text{support}(A\cup B)}{\text{support}(A)}

A rule is strong if it satisfies the minimum support and minimum confidence thresholds.

Apriori algorithm for frequent itemsets

The Apriori property says that every subset of a frequent itemset must also be frequent. Equivalently, if an itemset is infrequent, all of its supersets are infrequent, which is used to prune the search.

Steps:

  1. Scan the database and count each item. Keep those with support at least min_sup to get L1L_1.
  2. Join step: join Lk−1L_{k-1} with itself to form the candidate kk-itemsets CkC_k.
  3. Prune step: remove any candidate that has an infrequent (k−1)(k-1)-subset.
  4. Scan the database to count the supports of the remaining candidates. Those meeting min_sup form LkL_k.
  5. Repeat steps 2 to 4 until LkL_k is empty. The union of all LkL_k is the set of frequent itemsets.
  6. Generate rules from each frequent itemset by splitting it into AA and BB and keeping rules with confidence at least min_conf.

Example, with min support count 2 and transactions T1 = {A,B,C}, T2 = {A,C}, T3 = {A,D}, T4 = {B,C}:

  • L1={A:3, B:2, C:3}L_1=\{A{:}3,\ B{:}2,\ C{:}3\} (D has count 1 and is dropped).
  • C2={AB,AC,BC}C_2=\{AB,AC,BC\} with counts 1,2,21,2,2, so L2={AC,BC}L_2=\{AC,BC\}.
  • C3={ABC}C_3=\{ABC\} is pruned because its subset ABAB is infrequent. The algorithm stops.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 5+5 marks

How can you use Gini index as attribute selection algorithm? Illustrate with an example. Describe the working mechanism of support vector machine.

Answer

Gini index for attribute selection

The Gini index measures the impurity of a data partition DD (used in CART):

Gini(D)=1−∑i=1mpi2Gini(D)=1-\sum_{i=1}^{m}p_i^2

where pip_i is the proportion of tuples of class CiC_i. For a binary split on attribute AA into D1D_1 and D2D_2:

GiniA(D)=∣D1∣∣D∣Gini(D1)+∣D2∣∣D∣Gini(D2)Gini_A(D)=\frac{|D_1|}{|D|}Gini(D_1)+\frac{|D_2|}{|D|}Gini(D_2)

The attribute (and split subset) with the minimum GiniA(D)Gini_A(D), that is the largest reduction in impurity ΔGini=Gini(D)−GiniA(D)\Delta Gini=Gini(D)-Gini_A(D), is chosen as the splitting attribute.

Example: 14 tuples of buys_computer, with 9 yes and 5 no.

Gini(D)=1−(914)2−(514)2=0.459Gini(D)=1-\left(\tfrac{9}{14}\right)^2-\left(\tfrac{5}{14}\right)^2=0.459

Income has low (3 yes, 1 no), medium (4 yes, 2 no) and high (2 yes, 2 no). Consider the split {low, medium} versus {high}:

  • D1D_1 has 10 tuples (7 yes, 3 no), so Gini(D1)=1−0.49−0.09=0.42Gini(D_1)=1-0.49-0.09=0.42.
  • D2D_2 has 4 tuples (2 yes, 2 no), so Gini(D2)=1−0.25−0.25=0.5Gini(D_2)=1-0.25-0.25=0.5.

Giniincome(D)=1014(0.42)+414(0.5)=0.300+0.143=0.443Gini_{income}(D)=\tfrac{10}{14}(0.42)+\tfrac{4}{14}(0.5)=0.300+0.143=0.443

The reduction is 0.459−0.443=0.0160.459-0.443=0.016. The same is computed for the other subsets and attributes, and the one with the lowest Gini is chosen as the node.

Support Vector Machine (SVM)

SVM is a supervised classifier that finds the maximum-margin hyperplane separating two classes.

  1. Each tuple is a point x\mathbf{x} in feature space with label y=±1y=\pm1.
  2. A separating hyperplane is w⋅x+b=0\mathbf{w}\cdot\mathbf{x}+b=0. Of the many possible hyperplanes, SVM picks the one with the largest margin 2∥w∥\frac{2}{\|\mathbf{w}\|} between the two classes.
  3. The training points lying on the margin boundaries are the support vectors, and they alone define the hyperplane.
  4. Training solves the optimisation problem: minimise 12∥w∥2\frac{1}{2}\|\mathbf{w}\|^2 subject to yi(w⋅xi+b)≥1y_i(\mathbf{w}\cdot\mathbf{x}_i+b)\ge1. This is solved with Lagrange multipliers (a quadratic programming problem).
  5. For non-separable data, a soft margin (parameter CC) allows some errors. For non-linear data, a kernel function (polynomial, RBF) maps the data into a higher-dimensional space where it becomes linearly separable.
  6. A new tuple is classified by the sign of w⋅x+b\mathbf{w}\cdot\mathbf{x}+b.

SVMs are accurate and resist overfitting, but training is slow on large data.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 5 marks

How do you find similarities between ordinal data attributes? Explain.

Answer

An ordinal attribute has values with a meaningful order or rank, but the gap between values is unknown (e.g. grade: fair < good < excellent). Similarity is computed by converting the ranks to a numeric scale and then treating them as interval-scaled values.

Steps (for attribute ff with MfM_f ordered states):

  1. Replace each value xifx_{if} by its rank rif∈{1,…,Mf}r_{if}\in\{1,\dots,M_f\}.
  2. Normalise each rank onto [0,1][0,1] so that every attribute has equal weight:

zif=rif−1Mf−1z_{if}=\frac{r_{if}-1}{M_f-1}

  1. Compute the dissimilarity with a distance measure such as Euclidean or Manhattan on the zifz_{if} values, and similarity =1−d=1-d.

Example: test-2 has the states fair, good, excellent (Mf=3M_f=3). Ranks 1, 2, 3 give z=0, 0.5, 1z=0,\ 0.5,\ 1. For objects with values excellent, fair, good, fair the zz values are 1,0,0.5,01, 0, 0.5, 0. The distance between the objects with excellent and good is ∣1−0.5∣=0.5|1-0.5|=0.5, so the similarity is 0.50.5. Between excellent and fair, d=1d=1 and the similarity is 00.

When there are several ordinal attributes, the per-attribute distances are combined, for instance by Euclidean distance. If they are mixed with other attribute types, the weighted combination d(i,j)=∑fδij(f)dij(f)∑fδij(f)d(i,j)=\dfrac{\sum_f \delta_{ij}^{(f)}d_{ij}^{(f)}}{\sum_f\delta_{ij}^{(f)}} is used.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 5 marks

Differentiate between full cube and closed cube.

Answer

BasisFull cubeClosed cube
DefinitionAll cuboids are materialised and every non-empty cell is computed.Only closed cells are stored. A cell is closed if no more specific descendant cell has the same measure value (or covers the same set of base tuples).
StorageVery large, grows exponentially with dimensions.Much smaller, because redundant cells are removed.
RedundancyHigh. Many cells carry the same aggregate.Low. Non-closed cells can be derived from closed ones.
Information lossNone, all cells are explicit.None, since all cells can be recovered from the closed cells.
Query speedFast, direct lookup.Slightly slower for non-closed cells, which must be derived.
Computation costHigh.Lower, with efficient algorithms such as C-Cubing.
UseSmall or low-dimensional data.High-dimensional, large data.

Example: if cell (a1,b1,∗)(a_1,b_1,*) and its more specific cell (a1,b1,c1)(a_1,b_1,c_1) both have count 5, the first is not closed. A closed cube stores only (a1,b1,c1)(a_1,b_1,c_1), and (a1,b1,∗)(a_1,b_1,*) is derived from it.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 5 marks

Discuss about lazy learners and ensemble method.

Answer

Lazy learners

A lazy learner stores the training tuples and does little work until a test tuple arrives. Only then does it generalise, by comparing the new tuple with the stored ones. Training is therefore very fast, but classification is slow and needs a lot of storage, because every prediction needs a scan or index search over the training data.

Examples are the k-nearest neighbour (k-NN) classifier, which assigns the majority class among the kk closest training tuples (by Euclidean distance), case-based reasoning and locally weighted regression. They can model complex decision boundaries, but they are sensitive to irrelevant attributes and need attribute scaling. Eager learners (decision trees, SVM, Naive Bayes) build a model first, in contrast.

Ensemble methods

An ensemble combines several base classifiers M1,…,MkM_1,\dots,M_k and classifies a new tuple by voting or averaging their predictions. A combination of diverse classifiers is usually more accurate than any single one and reduces variance, bias or overfitting.

Common methods:

  • Bagging (bootstrap aggregating): each model is trained on a bootstrap sample (sampling with replacement) and the predictions are combined by majority vote. Random forest is bagged decision trees with random attribute selection.
  • Boosting (e.g. AdaBoost): models are built sequentially. Misclassified tuples get higher weights so the next model focuses on them, and the final vote is weighted by each model's accuracy.
  • Stacking: a meta-classifier learns how to combine the outputs of the base models.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 5 marks

Explain the types of data in clustering.

Answer

Clustering works on an nn objects by pp variables data matrix (or an n×nn\times n dissimilarity matrix). The types of variables determine how similarity is measured.

1. Interval-scaled variables: continuous measurements on a linear scale (weight, height, temperature). They are standardised first, e.g. z=x−μσz=\frac{x-\mu}{\sigma}, and distance is computed with Euclidean d=∑(xi−xj)2d=\sqrt{\sum(x_{i}-x_{j})^2}, Manhattan or Minkowski distance.

2. Binary variables: two states, 0 and 1. For symmetric binary variables, d(i,j)=r+sq+r+s+td(i,j)=\frac{r+s}{q+r+s+t}. For asymmetric ones, the Jaccard measure d(i,j)=r+sq+r+sd(i,j)=\frac{r+s}{q+r+s} is used. Here qq is the number of positions where both are 1, rr and ss those where they differ, and tt where both are 0.

3. Nominal (categorical) variables: more than two unordered states (colour). The dissimilarity is d(i,j)=p−mpd(i,j)=\frac{p-m}{p}, where mm is the number of matches and pp the number of variables.

4. Ordinal variables: ordered states (rank). Ranks are mapped to [0,1][0,1] by z=r−1M−1z=\frac{r-1}{M-1} and treated as interval-scaled.

5. Ratio-scaled variables: positive measurements on a non-linear scale, such as exponential growth. A logarithmic transformation is applied before treating them as interval-scaled.

6. Mixed-type variables: real data has several types together. The dissimilarities of each type are combined into one by the weighted formula d(i,j)=∑fδij(f)dij(f)∑fδij(f)d(i,j)=\frac{\sum_f\delta_{ij}^{(f)}d_{ij}^{(f)}}{\sum_f\delta_{ij}^{(f)}}.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 2+3 marks

What is outlier? How do you cluster high dimensional data?

Answer

Outlier

An outlier is a data object that deviates significantly from the rest of the data, as if it were generated by a different mechanism. It may be caused by measurement error or noise, or may be a genuine rare event, as in credit-card fraud, intrusion or medical anomalies.

Clustering high-dimensional data

In high dimensions, many attributes are irrelevant and the distances between objects become nearly equal (the curse of dimensionality), so clusters hide in subspaces. Main approaches:

  • Subspace clustering: search for clusters in subsets of dimensions, e.g. CLIQUE (grid-based and density-based, using the Apriori-like monotonicity of dense units) and PROCLUS (projected clustering).
  • Dimensionality reduction: apply PCA, SVD or feature selection first and then cluster in the reduced space.
  • Biclustering: cluster rows and columns together (e.g. genes and conditions).
  • Frequent pattern based clustering for very high-dimensional data such as text, where frequent terms define the clusters.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 2+3 marks

Define viral marketing. Describe densification power law.

Answer

Viral marketing

Viral marketing is a promotion strategy in which customers who like a product spread it to their friends and contacts through a social network, by word of mouth and online sharing. The marketer targets a small set of influential customers and the message spreads like a virus, so the cost is low. In data mining, the aim is to find the most influential nodes (the influence maximisation problem).

Densification power law

Real social and information networks become denser over time. The number of edges grows faster than the number of nodes, so the average degree increases instead of staying constant. Densification is expressed as

e(t)∝n(t)aore(t)=c n(t)a,1≤a≤2e(t)\propto n(t)^{a}\quad\text{or}\quad e(t)=c\,n(t)^{a},\qquad 1\le a\le 2

where e(t)e(t) and n(t)n(t) are the numbers of edges and nodes at time tt. If a=1a=1 the graph stays sparse (constant average degree), and if a=2a=2 it becomes a clique-like, fully dense graph. Real networks have 1<a<21<a<2, and the plot is a straight line on log-log axes with slope aa. A related observation is that the effective diameter often shrinks as the network grows.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 5 marks

Differentiate between agglomerative and divisive clustering approach.

Answer

BasisAgglomerativeDivisive
ApproachBottom-upTop-down
StartEach object is its own cluster (n clusters).All objects are in a single cluster.
ProcessRepeatedly merges the two closest clusters until one cluster remains (or a stopping condition).Repeatedly splits a cluster into smaller ones until each object is a singleton (or a stopping condition).
DecisionWhich two clusters to merge, using single, complete or average linkage.Which cluster to split and how, using e.g. DIANA.
ComplexityAbout O(n2log⁡n)O(n^2\log n) or O(n3)O(n^3), with only pairwise merges to consider.Higher, since there are 2n−1−12^{n-1}-1 possible splits of a cluster.
ExamplesAGNES, BIRCH, CURE.DIANA.
ResultDendrogram built from leaves up.Dendrogram built from the root down.

Neither can undo a merge or split once done, and both produce a dendrogram, which can be cut at a chosen level to obtain the clusters.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 5 marks

What type of analysis can be performed in social network? Explain.

Answer

Social network analysis (SNA) studies relationships among people, groups or organisations, modelled as a graph with nodes (actors) and edges (ties). The main analyses are:

  1. Link prediction: predict whether a link will form between two nodes in the future (friend suggestion) using the common neighbours, Jaccard coefficient or path-based measures.
  2. Community detection (clustering): find densely connected groups of nodes, e.g. with modularity-based and hierarchical (Girvan-Newman) methods.
  3. Centrality and influence analysis: find the important or influential nodes by degree, closeness, betweenness and eigenvector centrality (PageRank). This is used in viral marketing.
  4. Classification of nodes/links: label nodes (spammer or genuine, interest group) from their attributes and neighbours.
  5. Information diffusion analysis: study how information, ideas or diseases spread through the network.
  6. Evolution analysis: study how the network grows over time (densification, shrinking diameter, power-law degree distribution, small-world property).
  7. Sentiment and opinion mining of posts, and anomaly/fraud detection such as fake accounts.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082.1 · 5 marks

Discuss about web structure, web content and web usage mining.

Answer

Web mining applies data mining techniques to discover useful information from the World Wide Web. It has three categories.

1. Web content mining It extracts useful knowledge from the content of web pages, including text, images, audio, video and structured records. Tasks include page classification and clustering, information extraction, text summarisation, opinion mining and search-result mining. Techniques come from text mining and information retrieval, such as TF-IDF and keyword extraction.

2. Web structure mining It analyses the hyperlink structure of the web, treating pages as nodes and hyperlinks as edges of a graph. It discovers authoritative and important pages and communities, e.g. with the PageRank and HITS (hubs and authorities) algorithms. It is used to rank search results and to detect spam and web communities.

3. Web usage mining It discovers user access patterns from web logs (server logs, proxy logs, cookies, clickstreams). The process has pre-processing (data cleaning, user and session identification), pattern discovery (association rules, sequential patterns, clustering) and pattern analysis. It is used for site personalisation, recommendation, improving site design, caching and e-commerce marketing.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

Questions from TU BIT 2081 Eighth Semester Network and System Administration (TU IOST semester board exam, 2081 (BS), via StudyNp), TU BIT 2082 Eighth Semester Network and System Administration (TU IOST semester board exam, 2082 (BS), via StudyNp), TU BIT 2082.1 Eighth Semester Network and System Administration (TU IOST semester board exam, 2082.1 (BS), via StudyNp), TU BIT 2081 Eighth Semester E-Governance (TU IOST semester board exam, 2081 (BS), via StudyNp), TU BIT 2082 Eighth Semester E-Governance (TU IOST semester board exam, 2082 (BS), via StudyNp), TU BIT 2082.1 Eighth Semester E-Governance (TU IOST semester board exam, 2082.1 (BS), via StudyNp), TU BIT 2081 Eighth Semester Data Warehousing and Data Mining (TU IOST semester board exam, 2081 (BS), via StudyNp) and TU BIT 2082.1 Eighth Semester Data Warehousing and Data Mining (TU IOST semester board exam, 2082.1 (BS), via StudyNp). Answers are written for this site; check them against your class notes.