Source: 1_DM_Intro.pdf.
This follows the lecture order. Definitions use exam language; Plain meaning callouts translate the idea, and PYQs include the complete question with a writeable answer.
1. What is data mining?
Data mining is the extraction of useful patterns and knowledge from large data sources such as databases, data warehouses, text, the Web, images, and streams. It is commonly discussed as the central step in Knowledge Discovery in Databases (KDD).
A pattern is worth keeping only when it is valid, novel, potentially useful, and understandable.
A retailer already stores millions of bills. Mining is not merely searching those bills; it discovers useful facts such as which products are bought together or which customers may leave.
2. Classic data-mining tasks
| Task | What it discovers | Example |
|---|---|---|
| Regression | Numeric relationship/prediction | Predict next month’s sales from price and advertising. |
| Classification | A model that puts a new object into a known class | Predict fraud versus not fraud. |
| Association rules | Co-occurrence implication | {cheese, milk} -> {bread}. |
| Clustering | Similarity groups without given labels | Group customers by purchasing behaviour. |
| Sequential-pattern mining | Ordered events that recur | Laptop purchase -> camera purchase. |
| Deviation detection | Significant change/unusual behaviour | Sudden increase in a cardholder’s spending. |
| Data visualization | Graphical presentation of patterns | Scatterplot showing clusters/outliers. |
Classification starts with labelled examples and predicts a known label. Clustering starts without labels and finds natural groups.
When is a system “data-rich but information-poor”?
When it stores large quantities of data but cannot extract useful knowledge for decisions. For example, a retailer records sales but does not analyze buying patterns.
3. Why data mining is important
Computerised business, e-commerce, science, sensors, cameras, social media, and the Web produce data faster than people can inspect it. This creates a data-rich but information-poor situation: much data is stored, but little actionable knowledge is available.
Ordinary database queries retrieve facts already specified by the user. Mining can answer questions such as “who is likely to buy?”, “who may respond to a promotion?”, and “which item/movie should be recommended?” The main drivers are abundant data, available computing power and tools, and competitive pressure. Sources include business transactions/stocks, scientific simulation/bioinformatics, and public digital content.
4. Related fields and applications
Data mining is interdisciplinary: machine learning, statistics, databases, information retrieval, visualization, and natural-language processing all contribute methods.
| Area | Typical mining use |
|---|---|
| Marketing | Customer profiling, retention, segmentation, campaign targeting. |
| Engineering | Identify causes of product/process faults. |
| Science | Analyse biological, experimental, remote-sensing, or simulation data. |
| Security/finance | Credit-card fraud and intrusion detection. |
| Text and Web | Search, document analysis, recommendation, Web usage analysis. |
Write short notes on applications in intrusion detection and prevention, science and technology, finance, retail, and telecommunications.
- Intrusion detection and prevention: mine network traffic or logs for known attack patterns and anomalies; investigate alerts and use validated rules to block threats.
- Science and technology: identify patterns in gene sequences, astronomical observations or experimental measurements, helping researchers generate hypotheses.
- Finance: detect unusual transactions and build credit-risk or fraud models from transaction histories.
- Retail: use association analysis for product placement and promotions, and cluster customers for segmentation.
- Telecommunications: predict churn from usage and service data, detect unusual calling behavior and plan network capacity.
A discovered association or anomaly needs validation; it is not automatically proof of a cause or an attack.
Present a business example where data mining is crucial and explain the mining functionalities it needs.
An online retailer uses transaction, browsing and customer-service records to improve sales and retention.
- Association mining: identify products often bought together for recommendations and basket placement.
- Classification: predict which customers are likely to churn or respond to a campaign.
- Clustering: segment customers with similar behavior for targeted offers.
- Regression: estimate future demand or a customer’s expected spending.
- Outlier detection: flag unusual orders for fraud review.
The business evaluates patterns on relevant held-out data and considers whether they lead to useful decisions.
Write short notes on text mining, sequential pattern mining, biological sequences and time-series sequence patterns.
Text mining extracts useful structure from unstructured text. For example, preprocess customer reviews, represent their words or meaning numerically, and classify sentiment or group recurring complaints.
Sequential pattern mining finds frequent ordered events. If customers often buy a phone and later buy a case, phone → case is a sequential pattern; order matters. Support counts how many sequences contain the pattern, subject to the chosen matching rules.
Biological sequence mining looks for recurring DNA, RNA or protein subsequences, such as motifs associated with a function. Sequence order is essential, and findings need biological validation.
Time-series sequence mining searches ordered observations for recurring subsequences or temporal trends, such as a repeated demand pattern; time gaps, noise and scaling can matter.
5. Components of a data-mining system
- Database/data-warehouse server: fetches data relevant to the mining request.
- Knowledge base: domain knowledge, concept hierarchies, metadata, and rules that guide discovery/evaluate patterns.
- Data-mining engine: modules for characterization, association/correlation, classification, prediction, clustering, outlier, and evolution analysis.
- Pattern-evaluation module: applies interestingness measures so search focuses on useful results.
- User interface: lets users state the task/constraints and inspect the result.
6. KDD process
This comes after the introduction, classic tasks, motivation, related fields, applications, and system components - the same order as the lecture.
The figure shows the same selection -> preprocessing -> mining -> evaluation flow, including the feedback loops that make KDD iterative.
The practical process is: understand the domain/objective; identify sources and target data; preprocess; mine patterns/models; evaluate/interpret them; and use the resulting knowledge in the real task.
Formal KDD steps
- Data cleaning: remove noise/inconsistency and handle missing values.
- Data integration: combine data from multiple sources.
- Data selection: retrieve data relevant to the task.
- Data transformation: aggregate, normalize, or consolidate data into a suitable mining form.
- Data mining: apply intelligent methods to extract patterns.
- Pattern evaluation: retain truly interesting patterns using measures/constraints.
- Knowledge presentation: present mined knowledge through visualization/representation methods.
The stages can overlap; for example, cleaning can require transformation, and evaluation may force a return to selection or preprocessing.
Describe the steps involved in data mining process of knowledge discovery.
Knowledge discovery is an iterative process that transforms raw data into actionable knowledge.
- Clean noise, missing values, duplicates, and inconsistencies.
- Integrate compatible data from databases/files and resolve schema/value conflicts.
- Select target data relevant to the objective.
- Transform it by normalization, aggregation, generalization, or attribute construction.
- Mine patterns/models using association, classification, regression, clustering, and similar methods.
- Evaluate validity, novelty, usefulness, and interestingness.
- Present final knowledge as rules, tables, reports, or visualizations and use it in the application.
The process is iterative: evaluation can show that different data, cleaning, or transformation is needed.
Describe the steps in knowledge discovery.
The knowledge-discovery process turns raw data into useful, understandable knowledge:
- Cleaning: correct errors, handle missing values and noise.
- Integration: combine and reconcile data from different sources.
- Selection: retain the records and attributes relevant to the objective.
- Transformation: normalize, aggregate or otherwise prepare the selected data.
- Data mining: apply a suitable algorithm to extract patterns.
- Pattern evaluation: identify patterns that are valid, useful and interesting.
- Knowledge presentation: communicate results through reports, rules or visualizations.
For example, a retailer cleans and merges sales records, selects transactions, mines associations and evaluates whether the discovered combinations are useful. The stages can be repeated when results reveal a problem.
7. What kind of data can be mined?
The basic forms are database data, data-warehouse data, and transactional data. Mining also applies to streams, ordered/sequential data, graphs/networks, spatial data, text, multimedia, and the World Wide Web.
8. Patterns that can be mined
Descriptive and predictive tasks
- Descriptive mining characterizes what is present in a target set.
- Predictive mining learns from current data to predict an unknown/future value.
Class description: characterization and discrimination
- Characterization summarizes general features of one target class, e.g. a profile of high-value customers. Methods include statistical summaries/plots, cube roll-up, and attribute-oriented induction.
- Discrimination compares a target class against contrasting classes, e.g. high-value versus low-value customers.
Frequent patterns, associations, and correlations
- A frequent itemset is a group of items that often occurs together, e.g. milk and bread.
- A frequent subsequence is an ordered recurring sequence, e.g. laptop -> camera -> memory card.
- A frequent structured pattern is a recurring graph, tree, or lattice substructure.
Classification and regression
Classification learns a model from labelled training tuples and predicts a discrete class label for a new tuple. A model can be a decision tree, rule set, neural network, and so on.
Regression predicts a numeric value rather than a class label, e.g. sales or salary, and can reveal numeric trends. The word prediction is sometimes used for both class-label and numeric prediction; state which one is intended.
Cluster and outlier analysis
Clustering groups objects so that intra-cluster similarity is high and inter-cluster similarity is low. An outlier does not conform to general behaviour. It can be noise, but it can be the important discovery - for example, a credit-card transaction much larger than the owner’s normal purchases.
9. Major issues in data mining
| Group | Issues |
|---|---|
| Mining methodology | Mine new kinds of knowledge/multidimensional patterns; handle uncertainty/noise/incompleteness; evaluate patterns; use constraints. |
| User interaction | Interactive mining, background knowledge, ad-hoc query languages, understandable presentation. |
| Efficiency/scalability | Efficient, scalable, parallel, distributed, incremental algorithms. |
| Database diversity | Complex, dynamic, networked, global repositories. |
| Society | Privacy-preserving mining, social impact, invisible mining. |
What are the major issues in data mining? Define with suitable examples: nominal attributes and ordinal attributes.
The major issues are mining methodology, user interaction, efficiency/scalability, diversity of data sources, and social impact/privacy, as summarized above.
A nominal attribute has unordered symbolic categories: hair_colour ∈ {black, brown, blonde} or marital_status ∈ {single, married, divorced}. Arithmetic and ordering are meaningless.
An ordinal attribute has a meaningful rank but unknown/unequal distance between ranks: poor < fair < good < excellent or grades C < B < A. Order is meaningful; subtraction is not.
What are the major issues in data mining?
Data quality and integration, scalability, high dimensionality, heterogeneous or changing data, interestingness, privacy, security and interpretability.
10. Data quality and why preprocessing is needed
Data-quality dimensions are accuracy, completeness, consistency, timeliness, believability, value added, interpretability, and accessibility.
Real data is commonly:
- incomplete: missing values/attributes or only aggregate data, e.g. blank occupation;
- noisy: error/exceptional values, e.g. salary = -10; and
- inconsistent: conflicting codes/names/linked values, e.g. recorded age conflicts with birthday or ratings
1,2,3mix withA,B,C.
Incomplete values can arise from “not applicable” values, changed requirements, or human/hardware/software problems. Noise can arise from faulty instruments, entry errors, or transmission errors. Inconsistency can arise when sources disagree or a functional dependency is violated. Duplicate records also require cleaning.
“No quality data, no quality mining result.” Bad input causes misleading statistics/models; data extraction, cleaning, and transformation are essential before a consistent warehouse or trustworthy mining result.
11. Major preprocessing tasks
- Cleaning: fill missing values, smooth noise, detect/remove outliers, resolve inconsistencies.
- Integration: combine databases, cubes, or files.
- Transformation: normalize and aggregate.
- Reduction: obtain a smaller representation with the same/similar analytical result.
- Discretization: convert a numerical range to intervals.
The detailed methods are developed in 02-data-preprocessing.md, the note for 2_DM_preprocessing.pdf.
12. Descriptive statistics and visual summaries
Central tendency
| Measure | Meaning |
|---|---|
| Arithmetic mean | ; sensitive to extremes. |
| Weighted mean | ; observations have different importance/frequency. |
| Trimmed mean | Mean after dropping extremes; less sensitive to outliers. |
| Median | Middle sorted value (or average of two middles); robust to extremes. |
| Mode | Most frequent value; a distribution may be uni-, bi-, or multimodal. |
For moderately skewed data, .
What is data visualization? Explain types of visualization.
Data visualization represents information graphically so that a person can inspect distributions, relationships, trends and unusual cases.
- A histogram groups numerical observations into intervals and displays their frequencies; it reveals shape and skew.
- A boxplot summarizes median, quartiles and spread, and can flag potential outliers.
- A scatterplot plots two numerical variables to reveal association or clusters.
- A line chart shows changes over time; a bar chart compares values across categories.
For example, plotting customer age against spending may reveal a relationship that is difficult to see in a table.
Symmetry, skewness, and spread
- Symmetric: mean, median, and mode approximately coincide.
- Positive/right skew:
mode < median < mean. - Negative/left skew:
mean < median < mode. - is the 25th percentile, the 75th percentile, and .
- Five-number summary: minimum, , median, , maximum.
- A common outlier rule marks values below or above .
- Sample variance: ; standard deviation is .
In a boxplot, the box ends are , its central line is the median, whiskers extend outward, and outliers appear separately.
Histogram, scatterplot, LOESS, and correlation
- A histogram is a univariate set of bars showing frequencies in intervals.
- A scatterplot maps each pair to a point; it reveals clusters, trends, and outliers.
- A LOESS curve is smooth local regression added to a scatterplot to reveal dependence; its form depends on a smoothing parameter and polynomial degree.
- An upward point pattern is positive correlation, a downward pattern negative correlation, and a shapeless cloud indicates no clear correlation.
A histogram answers “what shape does one variable have?” A scatterplot answers “how do two variables move together?”
State the difference between data mining and machine learning.
Data mining seeks useful, previously unknown patterns in data as part of a larger knowledge-discovery process; it includes association discovery, clustering and anomaly analysis. Machine learning develops methods that learn models from data for prediction or other tasks. Their methods overlap: a decision tree can be used to mine customer patterns or to predict a new customer’s class. Data mining additionally emphasizes data selection, cleaning and interpretation in the application context.
13. Data mining versus machine learning
| Aspect | Data mining | Machine learning |
|---|---|---|
| Main aim | Discover useful/understandable patterns from large repositories | Learn models that generalize/predict from data |
| Typical context | Databases, warehouses, transactions, text/Web data | Algorithms, training/testing, prediction/decision-making |
| Relationship | Uses ML, statistics, databases, visualization | Supplies many algorithms used by mining |
Safe exam statement: machine learning is a key technology used by data mining, but data mining adds database-scale discovery, pattern evaluation, and knowledge presentation.




















