English:Data Mining

Data Mining
Introduction
Data mining is the computational process of discovering useful, non-trivial patterns, relationships, structures, and predictive signals in data. It draws on statistics, machine learning, database systems, data visualization, and domain knowledge. In a university setting, you should treat data mining not as a single algorithm but as an evidence-building workflow: define a meaningful question, understand the data-generating process, prepare data responsibly, select methods that fit the task, evaluate results against appropriate baselines, and communicate limitations.
Data mining is closely related to knowledge discovery in databases. The broader knowledge-discovery process includes selecting and preparing data, applying analytical methods, interpreting patterns, and deciding whether the findings are useful and trustworthy. A model with strong numerical performance can still be unsuitable if its data are biased, its evaluation leaks information from the future, or its output does not answer the original question.

The CRISP-DM process illustrates an iterative project structure with six connected phases: business understanding, data understanding, data preparation, modeling, evaluation, and deployment. In research or public-sector contexts, "business understanding" can be read more broadly as problem and stakeholder understanding. You often return to earlier phases when assumptions fail or new evidence appears.
By the end of this aiMOOC, you should be able to distinguish major data-mining tasks, construct a defensible workflow, explain common algorithms, choose evaluation measures, detect methodological errors such as data leakage, and discuss privacy, fairness, reproducibility, and deployment risks.
From Data to a Mining Question
A useful data-mining question specifies an analytical unit, a target or pattern of interest, available features, a time frame, and a decision context. "Predict customer churn" is incomplete until you define what counts as churn, when prediction must occur, which data are available at that moment, and how a prediction would be used. Clear operational definitions prevent an algorithm from solving the wrong problem very efficiently.
Data can be structured as tables, transactions, graphs, sequences, text, images, sensor streams, or combinations of these. The representation strongly influences which methods are appropriate. A transaction dataset naturally supports association rule learning, while a labeled table can support classification or regression. Network data may call for graph mining, and time-dependent observations require methods that respect temporal order.
A good first step is exploratory analysis. Inspect distributions, missingness, duplicates, impossible values, class balance, temporal coverage, and relationships among variables. Visualization is not merely presentation; it is a diagnostic tool that can reveal skew, subgroup structure, measurement artifacts, and unexpected correlations before modeling.
The CRISP-DM Workflow
CRISP-DM provides a practical framework for organizing data-mining projects. Its phases are iterative rather than strictly linear.
- Problem definition: Translate a real-world objective into measurable analytical questions and success criteria.
- Data understanding: Identify sources, variables, quality problems, sampling mechanisms, and possible biases.
- Data preprocessing: Clean, integrate, transform, encode, scale, and select features without leaking information from the evaluation data.
- Modeling: Train suitable algorithms and compare them with transparent baselines.
- Model evaluation: Test whether the model generalizes and whether the chosen metrics reflect the real costs of errors.
- Deployment: Integrate results into a process, monitor performance and data drift, document decisions, and plan maintenance.
A critical principle is that evaluation information must not influence model training. If you standardize features, select variables, or impute missing values using the entire dataset before creating a test split, the estimated performance may be optimistically biased. In a sound pipeline, transformations that learn from data are fitted on training data and then applied to validation or test data.
Data Preparation and Feature Engineering
Data preparation often consumes more effort than model fitting because real datasets contain inconsistent formats, missing values, duplicated records, measurement errors, and variables on incompatible scales. You should document every transformation so that another person can reproduce the analysis.
Common operations include handling missing values, removing or reconciling duplicates, correcting data types, encoding categorical variables, scaling numeric features, transforming skewed variables, and constructing domain-informed features. The treatment of missing values should reflect why values are missing rather than automatically replacing every blank with a mean.
Feature selection keeps a subset of available variables, while feature extraction creates new representations. Principal component analysis is a linear feature-extraction method that finds orthogonal directions capturing as much variance as possible. PCA can reduce dimensionality and reveal structure, but its components may be less interpretable than the original variables, and scaling choices can strongly affect the result.
Dimensionality reduction can help with visualization, compression, noise reduction, and computational efficiency. It does not automatically improve predictive accuracy, and a two-dimensional visualization should not be mistaken for proof that clusters truly exist in the original feature space.
Supervised Data Mining
In supervised learning, each training example includes an outcome to be predicted. Classification predicts discrete labels such as "fraud" or "not fraud", while regression predicts numerical outcomes such as energy demand. Common supervised methods include logistic regression, decision trees, random forests, gradient-boosted trees, nearest-neighbor methods, support vector machines, and neural networks.

A decision tree recursively splits the feature space into regions. Each internal node asks a question about a feature, and each leaf produces a prediction. Trees are easy to visualize and can capture nonlinear interactions, but deep trees can overfit. Pruning, depth limits, minimum leaf sizes, or ensembles can improve generalization.
Model complexity should be compared against a baseline. A sophisticated classifier that reaches 91 percent accuracy is not useful if a simple majority-class rule already reaches 92 percent. The baseline, data distribution, and costs of errors determine whether an apparent improvement matters.
Classification Evaluation
For binary classification, a confusion matrix counts true positives, false positives, true negatives, and false negatives. These counts support several metrics.

Precision asks what proportion of predicted positives are actually positive. Recall asks what proportion of actual positives are detected. The F1 score combines precision and recall through their harmonic mean. Accuracy can be misleading when classes are highly imbalanced because a model can appear accurate while missing most cases in the minority class.
Receiver operating characteristic curves compare true-positive rate against false-positive rate across classification thresholds. The area under the ROC curve summarizes ranking performance across those thresholds, but it does not encode the operational costs of false positives and false negatives. Precision-recall curves are often informative when the positive class is rare.
For model selection, use training data to fit models, validation data or cross-validation to compare settings, and a held-out test set for a final estimate. Repeatedly tuning decisions to the test set turns it into another validation set and weakens the credibility of the final result.
Regression Evaluation
Regression models require different measures. Mean absolute error summarizes the average absolute deviation between prediction and observation. Root mean squared error gives greater weight to large errors. The coefficient of determination, often written as R-squared, compares residual variation with a reference based on the outcome mean.
No single metric is universally best. If a few very large errors are especially costly, squared-error measures may be meaningful. If interpretability in the original measurement unit matters, mean absolute error can be easier to communicate. Always inspect residuals because one summary number can hide systematic error across subgroups, ranges, or time periods.
Unsupervised Data Mining and Clustering
In unsupervised learning, there is no target label supplied for every observation. Cluster analysis attempts to organize observations into groups based on a chosen representation and similarity measure. Clusters are not objective facts hidden inside every dataset; they depend on variables, scaling, distance measures, algorithms, and parameter choices.

K-means clustering partitions observations into a chosen number of clusters by minimizing within-cluster squared Euclidean distances to cluster centroids. The algorithm alternates between assigning points to their nearest centroid and recomputing centroids. Because it can converge to different local solutions, initialization matters; k-means++ spreads initial centers more deliberately than simple random selection.
K-means works best when clusters are reasonably compact and compatible with Euclidean distance. DBSCAN instead groups points through density connectivity and can identify noise points, making it useful for irregularly shaped clusters when its density assumptions are appropriate. Hierarchical clustering creates a nested structure that can be visualized with a dendrogram.
Internal measures such as silhouette scores can help compare clustering configurations, but a high score is not enough. A useful cluster solution should also be stable, interpretable, relevant to the domain, and tested against alternative representations.
Association Rule Mining
Association rule learning discovers relationships among items or events, especially in transaction data. A rule such as "A implies B" does not establish that A causes B. It describes a pattern of co-occurrence that may be useful for exploration, recommendation, quality control, or hypothesis generation.

For an itemset X, support is the proportion of transactions containing X. For a rule X implies Y, confidence is the proportion of transactions containing X that also contain Y. Lift compares the observed co-occurrence with what would be expected if X and Y were independent. A lift greater than one indicates positive association under that definition, but a strong rule can still be unimportant, unstable, or spurious.
The Apriori algorithm uses the principle that every subset of a frequent itemset must also be frequent. This property allows the search to eliminate many impossible candidates. In large datasets, analysts must also control the explosion of rules and avoid selecting patterns only because they look surprising after extensive searching.
Anomaly Detection
Anomaly detection searches for observations or patterns that differ substantially from expected behavior. Applications include equipment monitoring, quality assurance, cybersecurity, and scientific discovery. Methods may rely on distance, density, isolation, probability models, reconstruction error, or supervised labels when known anomalies exist.
An anomaly score is not the same as proof of fraud, failure, or error. Rare observations may represent legitimate but unusual cases. Effective anomaly detection therefore requires domain review, threshold calibration, and attention to the cost of false alarms.
Text, Sequence, Graph, and Stream Mining
Many data-mining problems extend beyond ordinary tables. Text mining may transform documents using token counts, TF-IDF, topic models, or learned embeddings. Sequence mining searches for ordered patterns, while graph mining studies relationships represented as nodes and edges. Stream mining processes data that arrive continuously and may require bounded memory, approximate summaries, or online learning.
Large-scale mining changes the engineering constraints of analysis. Algorithms may need distributed storage, parallel computation, sampling, indexing, or approximate methods. A scalable method is not merely one that runs quickly on a small sample; it should have resource requirements that remain manageable as data volume, dimensionality, or arrival rate increases.
Stanford's open materials on Mining of Massive Datasets emphasize algorithms for large-scale settings, where exact computation may be too expensive and careful approximation becomes part of the design problem.
Reproducibility, Privacy, Fairness, and Responsible Use
A defensible data-mining project records data provenance, preprocessing steps, software versions, random seeds where relevant, model settings, evaluation procedures, and known limitations. Reproducibility is strengthened by pipelines, version control, environment specifications, and immutable snapshots of important datasets.
Privacy must be considered before analysis begins. Data minimization, access control, purpose limitation, aggregation, and carefully designed de-identification can reduce risk, but removing names does not guarantee anonymity. Combinations of seemingly harmless attributes can sometimes enable re-identification.
Fairness concerns arise when data reflect historical inequities, measurement errors, missing groups, or proxy variables. Comparing performance across relevant groups can reveal disparities, but fairness metrics can conflict and cannot replace ethical or legal judgment. You should document who may be affected, what decisions the model informs, what recourse is available, and which harms are plausible.
Data mining can support discovery and decision-making, but patterns are not automatically causal. Confounding, selection bias, feedback loops, and multiple testing can all produce misleading conclusions. Responsible analysis separates prediction from causal claims and communicates uncertainty.
A Compact End-to-End Example
Imagine that a university library wants to understand patterns in the use of digital resources. A sound project could begin with an operational question such as identifying usage segments to improve resource navigation without evaluating individual students. You could aggregate events at a privacy-preserving level, inspect missingness and temporal coverage, construct features describing resource categories and session behavior, and compare clustering methods.
After fitting candidate clusterings only on prepared analytical data, you would examine stability across random seeds or resamples, compare silhouette scores, and ask domain experts whether the groups are interpretable. You would avoid claiming that the clusters represent fixed types of people. A deployment decision might instead use the patterns to redesign navigation menus and then evaluate whether the redesign improves access for users overall.
This example shows why data mining is a socio-technical process: algorithms matter, but so do measurement, objectives, interpretation, governance, and feedback after deployment.
Interactive Tasks
Quiz: Test Your Knowledge
What is the central aim of data mining? (Discover useful patterns and knowledge in data) (!Store every record in a database) (!Guarantee causal conclusions from correlations) (!Replace domain expertise with automation)
Which practice best prevents data leakage during preprocessing? (Fit learned transformations on training data only) (!Compute scaling parameters from the full dataset) (!Choose features after inspecting test labels) (!Tune thresholds repeatedly on the test set)
Which task is typically unsupervised? (Clustering observations by similarity) (!Predicting a known class label) (!Estimating a continuous target) (!Calculating recall from labeled outcomes)
What does k-means clustering primarily minimize? (Within-cluster squared distance to centroids) (!The number of features in the dataset) (!The number of false positive predictions) (!The support of every association rule)
What does support measure in association rule mining? (The frequency of an itemset in transactions) (!The causal effect of one item on another) (!The depth of a decision tree) (!The variance explained by a classifier)
What does a lift value greater than one indicate for a rule? (Positive association relative to independence) (!Guaranteed causation between the items) (!Perfect classification accuracy) (!No relationship between the items)
Which metric asks how many actual positive cases were detected? (Recall) (!Precision) (!Specificity) (!Silhouette)
What is the main purpose of a final held-out test set? (Estimate generalization after model choices are fixed) (!Provide labels for unsupervised clustering) (!Generate new training features) (!Replace all validation procedures)
Which CRISP-DM phase establishes objectives and success criteria? (Business understanding) (!Data preparation) (!Modeling) (!Deployment)
Why should a deployed model be monitored over time? (Data distributions and relationships may change) (!A trained model can never be evaluated) (!Deployment removes the need for documentation) (!All models become causal after deployment)
Memory Game
| Classification | Supervised prediction of discrete labels |
| Clustering | Grouping observations by similarity without target labels |
| Support | Proportion of transactions containing an itemset |
| Confidence | Conditional frequency of a consequent given an antecedent |
| Lift | Association strength compared with statistical independence |
| Outlier | Observation that differs markedly from an expected pattern |
Drag and Drop
| Match the correct terms. | Topic |
|---|---|
| Normalization | Rescales numeric features to a comparable range or distribution |
| Cross-validation | Repeats training and validation across data partitions |
| Apriori | Uses downward closure to search frequent itemsets |
| DBSCAN | Forms clusters using density connectivity and identifies noise |
| Precision | Measures the correctness of positive predictions |
...
Crossword Puzzle
| Classification | What supervised task predicts a discrete class label? |
| Clustering | What task groups observations without target labels? |
| Validation | What process estimates performance while model choices are still being made? |
| Apriori | Which classic algorithm mines frequent itemsets using downward closure? |
| Privacy | What principle concerns appropriate protection of personal data? |
| Reproducibility | What property means an analysis can be repeated from documented procedures? |
LearningApps
Cloze Text
Open-Ended Tasks
Easy
- Data mining workflow diagram: Create a one-page diagram that maps a real dataset from question formulation through preparation, modeling, evaluation, and communication, and annotate one risk at each stage.
- Exploratory data analysis: Choose an open dataset and produce three informative visualizations that reveal distribution, missingness, class balance, or unusual observations; write a short interpretation for each.
- Data cleaning log: Clean a small messy dataset and keep a transparent change log showing what you changed, why you changed it, and how each decision could affect later analysis.
- Data mining explainer video: Record a three-minute video that explains the difference between classification, clustering, and association-rule mining using one original example for each.
Standard
- Classification study: Build a baseline classifier and one more complex classifier on an open labeled dataset, compare them with at least two suitable metrics, and explain which errors matter most.
- Cluster analysis experiment: Apply two clustering approaches to the same prepared dataset, compare stability and interpretability, and explain how scaling or feature choice changes the result.
- Association rule analysis: Mine frequent itemsets from a transaction dataset, compare support, confidence, and lift for selected rules, and identify one rule that looks strong but is not practically useful.
- Data practitioner interview: Interview a data analyst, researcher, librarian, or engineer about how they validate data quality and model results, then compare the interview with the workflow described in this course.
Advanced
- Fairness audit: Design a small audit that compares predictive performance across relevant subgroups, discuss what the chosen metrics reveal and omit, and propose a responsible response to any disparity.
- Concept drift simulation: Create or use time-ordered data, train a model on an earlier period, evaluate it on later periods, and visualize how performance changes as the data distribution shifts.
- Reproducible data pipeline: Build a fully reproducible pipeline from raw data to evaluated model using version control, fixed data splits, documented dependencies, and an automatically generated results table.
- Research replication critique: Select a published data-mining study with available data or code, reproduce one central result, record any obstacles, and write a critique of validity, reproducibility, and transferability.
Learning Assessment
- Method selection: Given a new dataset with mixed numeric and categorical variables and no target label, justify whether clustering, dimensionality reduction, association rules, or another approach best matches a stated research question.
- Leakage diagnosis: Inspect a hypothetical pipeline in which imputation, feature selection, and scaling occur before the train-test split, identify every source of leakage, and redesign the workflow.
- Metric reasoning: Compare two classifiers for a rare-event task when one has higher accuracy and the other has higher recall, then defend which model you would choose under two different error-cost scenarios.
- Clustering validity: Explain how you would decide whether a high silhouette score corresponds to a useful real-world segmentation, including stability, domain interpretation, and alternative representations.
- Association-rule critique: Evaluate a set of high-confidence rules, calculate or interpret lift, and explain why confidence alone can produce misleading conclusions.
- Responsible deployment: Design a monitoring and governance plan for a deployed data-mining system that addresses data drift, performance decay, privacy, subgroup impacts, documentation, and human oversight.
Evidence of Learning
| Evidence type | What successful learning looks like |
|---|---|
| Knowledge | You accurately explain the purposes, assumptions, and limitations of classification, regression, clustering, association rules, anomaly detection, dimensionality reduction, and model evaluation. |
| Skills | You can prepare data without leakage, build transparent baselines, select suitable metrics, interpret model outputs, compare alternatives, and diagnose methodological weaknesses. |
| Products | You produce reproducible notebooks or pipelines, evaluation reports, visualizations, model documentation, and concise explanations for technical and non-technical audiences. |
| Transfer | You can select and justify a data-mining approach for an unfamiliar domain, adapt evaluation to real error costs, identify privacy and fairness risks, and explain when a discovered pattern should not be interpreted causally. |
OERs on the Topic
For further open study, use MIT OpenCourseWare: Data Mining for graduate-level lecture notes, assignments, and exams. The open Mining of Massive Datasets materials provide a deeper route into scalable algorithms for large datasets. You can also revisit the embedded StatQuest videos as concise visual explanations of PCA, decision trees, k-means clustering, and ROC/AUC evaluation.
Linked Learning Areas
aiMOOC Projects
MOOCwiki · Deutsch
Nach dem Lernen ist vor dem Lernen
Entdecke direkt den nächsten Lernkurs. Weitere Inhalte erscheinen, wenn Du weiter nach unten scrollst.
Zur MOOCwiki-HauptseiteMediathek
Mediathek
Mediathek wird aus dem Wiki geladen ...
Keine passenden Inhalte gefunden. Bitte ändere Suche oder Filter.
NEWSLernweltNOAH fragen