← Back to quizzesFree quiz

Fundamentals of Data Mining and Decision Support

Data mining and machine learning are often mentioned together, but they serve distinct purposes in the data science workflow. Data mining focuses on discovering hidden patterns,…

10 questions~5 min
Fundamentals of Data Mining and Decision Support — Qwi
0 / 10
Score: 0%
1

Which of the following best describes the main difference between Data Mining and Machine Learning?

2

In a supervised learning task, what does the output variable Y represent?

3

A dataset contains the attributes age (continuous), number_of_children (discrete), and pet_type (categorical). Which preprocessing step is most appropriate for pet_type?

4

During model evaluation for binary classification, which metric best captures the trade‑off between precision and recall?

5

Which scenario illustrates a classic case of over‑fitting (sur‑apprentissage)?

6

In k‑fold cross‑validation, what is the purpose of the 'validation' folds?

7

Which of the following statements about normalization (min‑max scaling) is true?

8

A researcher wants to predict house prices (a continuous variable). Which supervised learning task should they choose?

9

In the confusion matrix for a binary classifier, which cell corresponds to false positives?

10

When preparing data, which step directly addresses missing values?

Understanding Data Mining vs. Machine Learning

Data mining and machine learning are often mentioned together, but they serve distinct purposes in the data science workflow. Data mining focuses on discovering hidden patterns, associations, and anomalies within existing datasets. It is primarily an exploratory process that answers questions such as "What relationships exist?" and "Which segments are most interesting?" In contrast, machine learning builds predictive models that can operate autonomously on new, unseen data. The goal is to learn a function that maps inputs to outputs, enabling tasks like classification, regression, and recommendation.

Key differences include:

  • Objective: Data mining extracts knowledge; machine learning predicts future outcomes.
  • Human involvement: Data mining often requires domain experts to interpret patterns, while machine learning models can make decisions with minimal human oversight after training.
  • Techniques: Data mining uses clustering, association rules, and summarization; machine learning employs algorithms such as decision trees, neural networks, and support vector machines.

Supervised Learning Fundamentals

What is the Output Variable Y?

In supervised learning, each training instance consists of an input vector X and a corresponding output variable Y. The output variable, also called the target or label, represents the value the model aims to predict. For classification tasks, Y is a categorical label (e.g., "spam" vs. "not spam"). For regression tasks, Y is a continuous value (e.g., house price).

Understanding Y is crucial because:

  • It determines the type of algorithm you should select (classification vs. regression).
  • It guides the choice of loss functions (cross‑entropy for classification, mean squared error for regression).
  • It influences evaluation metrics (accuracy, F‑measure, RMSE, etc.).

Data Pre‑Processing Techniques

Encoding Categorical Variables

Most machine‑learning algorithms require numerical input. Categorical attributes, such as pet_type, must be transformed into a numeric format. The most common method is one‑hot encoding, which creates a binary column for each category. For example, if pet_type can be "dog", "cat", or "bird", one‑hot encoding produces three new columns: pet_type_dog, pet_type_cat, and pet_type_bird. Each row receives a 1 in the column that matches its original category and 0 elsewhere.

Alternative techniques include label encoding (assigning integer codes) and binary encoding, but one‑hot encoding preserves the non‑ordinal nature of categories and avoids introducing artificial relationships.

Normalization (Min‑Max Scaling)

Normalization rescales numeric features to a common range, typically [0, 1]. The formula is:

X_norm = (X - X_min) / (X_max - X_min)

This transformation is essential when algorithms rely on distance calculations (e.g., k‑nearest neighbors) or gradient‑based optimization, as it prevents features with larger magnitudes from dominating the learning process. Normalization does not remove outliers; it merely compresses the scale.

Model Evaluation Metrics

Precision‑Recall Trade‑off and the F‑Measure

In binary classification, precision measures the proportion of predicted positives that are truly positive, while recall measures the proportion of actual positives that were correctly identified. Often, improving one metric reduces the other, creating a trade‑off.

The F‑measure (or F1‑score) captures this balance by computing the harmonic mean of precision and recall:

F1 = 2 * (precision * recall) / (precision + recall)

Because the harmonic mean penalizes extreme values, the F‑measure provides a single, interpretable score that reflects both false positives and false negatives, making it ideal for imbalanced datasets.

Over‑fitting and Model Generalization

Over‑fitting occurs when a model learns the noise and specific details of the training data rather than the underlying pattern. Such a model will achieve near‑perfect accuracy on the training set but perform poorly on unseen test data. This phenomenon is often described as "high variance".

Common signs of over‑fitting include:

  • Large gap between training and validation accuracy.
  • Complex models (deep trees, many parameters) with limited data.
  • Performance degradation when adding new data.

Mitigation strategies:

  • Regularization (L1/L2 penalties).
  • Pruning or reducing model complexity.
  • Increasing training data via augmentation.
  • Using cross‑validation to monitor generalization.

Cross‑Validation Techniques

Purpose of Validation Folds in k‑Fold CV

k‑fold cross‑validation splits the dataset into k equally sized folds. In each iteration, k‑1 folds are used for training, and the remaining fold serves as a validation set. This process repeats k times, ensuring every observation is used for validation exactly once.

The validation folds provide two critical benefits:

  • Performance estimation: They give an unbiased estimate of how the model will behave on unseen data.
  • Hyper‑parameter tuning: By evaluating different parameter settings on the validation folds, you can select the configuration that generalizes best.

After the optimal hyper‑parameters are identified, a final model is trained on the entire dataset and evaluated on a separate test set for a definitive performance report.

Choosing the Right Supervised Learning Task

When the target variable is continuous, such as predicting house prices, the appropriate supervised learning task is regression. Regression models estimate a numeric output based on input features, allowing you to predict values like price, temperature, or sales volume.

Typical regression algorithms include linear regression, decision‑tree regression, random forests, and gradient boosting machines. Evaluation metrics for regression differ from classification and often involve:

  • Mean Absolute Error (MAE)
  • Root Mean Squared Error (RMSE)
  • R² (coefficient of determination)

Selecting the right algorithm depends on data size, feature types, and the desired balance between interpretability and predictive power.

Key Takeaways for Data Mining and Decision Support

  • Data mining extracts patterns; machine learning builds predictive models.
  • In supervised learning, Y is the target label the model aims to predict.
  • One‑hot encode categorical variables; use min‑max scaling for normalization.
  • F‑measure balances precision and recall, especially useful for imbalanced classes.
  • Over‑fitting shows perfect training performance but poor test performance; combat it with regularization and cross‑validation.
  • k‑fold cross‑validation uses validation folds to estimate performance and tune hyper‑parameters.
  • Predicting a continuous outcome requires regression, not classification or clustering.

By mastering these concepts, you can design robust data‑driven decision‑support systems that turn raw data into actionable insights.