← Back to quizzesFree quiz

Data Mining and Machine Learning Core Concepts

In descriptive statistics, the mean and median are two fundamental measures of central tendency. While the mean calculates the arithmetic average, the median identifies the middle value when…

20 questions~10 min
Data Mining and Machine Learning Core Concepts — Qwi
0 / 20
Score: 0%
1

When is the median preferred over the mean as a measure of central tendency?

2

According to the IQR rule, which points are considered outliers?

3

What is the formula for Jaccard similarity on asymmetric binary attributes?

4

Which special case of the Minkowski distance corresponds to Manhattan distance?

5

What is the main difference between supervised and unsupervised learning?

6

How is Jaccard dissimilarity defined for asymmetric binary attributes?

7

What is the relationship between variance and standard deviation?

8

What distinguishes a data matrix from a dissimilarity matrix?

9

What is the purpose of Z-score standardization?

10

Why might mean absolute deviation be preferred over standard deviation for scaling?

11

How is Cosine similarity between two vectors defined?

12

What is the key difference between classification and regression tasks?

13

What does a ROC curve plot?

14

What does an AUC value of 0.5 indicate about a classifier?

15

How is precision defined in binary classification?

16

What does recall measure in classification?

17

Which formula correctly computes the F1‑score?

18

What is the main purpose of SMOTE in handling imbalanced data?

19

In DBSCAN, what does the parameter ε (epsilon) control?

20

Why is K‑Medoids considered more robust to outliers than K‑Means?

Understanding Central Tendency: Mean vs. Median

In descriptive statistics, the mean and median are two fundamental measures of central tendency. While the mean calculates the arithmetic average, the median identifies the middle value when data are ordered.

When to Prefer the Median

The median is especially useful when the distribution is skewed or contains outliers. In such cases, extreme values can heavily distort the mean, making the median a more robust indicator of the typical observation.

  • Skewed distributions (e.g., income data)
  • Data with outliers (e.g., sensor errors)
  • Ordinal data where averaging is not meaningful

Choosing the median helps preserve the integrity of your analysis and improves the interpretability of results.

Identifying Outliers with the Interquartile Range (IQR) Rule

The IQR rule is a simple yet powerful method for detecting outliers in a dataset. It uses the first quartile (Q1), third quartile (Q3), and the interquartile range (IQR = Q3 - Q1).

Outlier Thresholds

Points are considered outliers if they fall below Q1 − 1.5·IQR or above Q3 + 1.5·IQR. This criterion captures observations that lie far from the central 50% of the data.

  • Calculate Q1 and Q3.
  • Compute IQR = Q3 - Q1.
  • Determine lower bound = Q1 - 1.5·IQR.
  • Determine upper bound = Q3 + 1.5·IQR.
  • Flag any data point outside these bounds as an outlier.

Applying the IQR rule helps clean data before feeding it into machine‑learning models, reducing bias and improving model performance.

Jaccard Similarity and Dissimilarity for Asymmetric Binary Attributes

When dealing with binary attributes where the presence (1) is more informative than the absence (0), we use the asymmetric Jaccard similarity. The contingency table for two objects i and j includes:

  • q: both i and j have value 1.
  • r: i = 1, j = 0.
  • s: i = 0, j = 1.
  • t: both i and j have value 0 (often ignored for asymmetric data).

Similarity Formula

The Jaccard similarity for asymmetric binary attributes is defined as:
simJaccard(i, j) = q / (q + r + s)

Dissimilarity (Distance) Formula

The corresponding dissimilarity (or distance) is:
D(i, j) = 1 - q / (q + r + s)

These measures are widely used in text mining, recommendation systems, and clustering of binary data.

Minkowski Distance and Its Special Cases

The Minkowski distance is a generalized metric that includes several well‑known distance measures as special cases. It is defined as:
\(d_{h}(x, y) = \left(\sum_{k=1}^{p} |x_k - y_k|^{h}\right)^{1/h}\)

Manhattan Distance

When the parameter h = 1, the Minkowski distance reduces to the Manhattan distance (also called L1 norm). This metric sums the absolute differences across dimensions and is useful for high‑dimensional, sparse data.

  • h = 2 → Euclidean distance (L2 norm)
  • h → ∞ → Chebyshev distance (maximum coordinate difference)
  • h = 1 → Manhattan distance (city‑block distance)

Choosing the appropriate h value depends on the nature of your data and the geometry you wish to capture.

Supervised vs. Unsupervised Learning

Machine learning algorithms are broadly categorized into supervised and unsupervised learning.

Supervised Learning

In supervised learning, models are trained on labeled data. Each training example includes an input vector and a known output (class label or numeric value). The goal is to learn a mapping from inputs to outputs, enabling predictions on new, unseen data.

  • Examples: classification, regression, time‑series forecasting.
  • Common algorithms: decision trees, support vector machines, neural networks.

Unsupervised Learning

Unsupervised learning works with unlabeled data. The algorithm seeks hidden structures, patterns, or groupings without explicit guidance.

  • Examples: clustering, dimensionality reduction, anomaly detection.
  • Common algorithms: k‑means, hierarchical clustering, PCA.

Understanding the distinction helps you select the right approach for your problem domain.

Variance and Standard Deviation: The Fundamental Relationship

Both variance and standard deviation quantify the spread of a dataset around its mean.

Key Relationship

The standard deviation is the square root of the variance:
\(\sigma = \sqrt{\text{Var}}\)

This relationship means that variance is expressed in squared units (e.g., dollars²), while standard deviation returns to the original units, making it more interpretable for practitioners.

  • Variance = average of squared deviations.
  • Standard deviation = square root of variance.
  • Both are essential for confidence intervals, hypothesis testing, and feature scaling.

Data Matrix vs. Dissimilarity Matrix

In data mining, two core representations of information are the data matrix and the dissimilarity matrix.

Data Matrix

A data matrix stores raw feature values for each observation. Rows typically represent instances (e.g., customers), and columns represent attributes (e.g., age, income).

  • Used as input for most supervised learning algorithms.
  • Can be dense or sparse depending on the data type.

Dissimilarity Matrix

A dissimilarity matrix contains pairwise distances or dissimilarities between objects. It is square (n × n) and symmetric for most distance measures.

  • Essential for clustering methods like hierarchical clustering.
  • Derived from the data matrix using a chosen distance metric (e.g., Euclidean, Jaccard).

Understanding the transformation from a data matrix to a dissimilarity matrix is crucial for selecting appropriate algorithms and interpreting results.

Key Takeaways for Data Mining and Machine Learning

  • Use the median for skewed data or when outliers are present.
  • Apply the IQR rule (Q1 − 1.5·IQR, Q3 + 1.5·IQR) to flag outliers.
  • Jaccard similarity for asymmetric binary data: q / (q + r + s); dissimilarity: 1 − q / (q + r + s).
  • Manhattan distance is the Minkowski distance with h = 1.
  • Supervised learning uses labeled data; unsupervised learning discovers patterns in unlabeled data.
  • Standard deviation is the square root of variance.
  • A data matrix holds raw features; a dissimilarity matrix holds pairwise distances.

Mastering these core concepts equips you to build robust models, perform effective exploratory data analysis, and choose the right techniques for diverse data mining tasks.