
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

CH AP T ER 09 • AP PLIED COMPUTING
Topic: Learning Paradigms, Model Training, Bias-Variance & Evaluation Metrics
Unlike rule-based software where programmers hardcode every condition, machine learning infers statistical patterns directly from training examples.
Supervised Learning: Trains on labeled input-output pairs. Used for classification (spam detection) and regression (house price forecasting). Unsupervised Learning: Discovers hidden groupings in unlabeled data, such as customer segmentation via clustering. Reinforcement Learning: An agent learns optimal actions inside an environment through trial-and-error rewards and penalties.
Datasets are divided into a Training Set (70–80%) to fit model parameters, a Validation Set to tune hyperparameters, and a held-out Test Set for unbiased final scoring.
Condition Training Error Test Error Primary Remedy
Underfitting (High Bias) High High Add informative features or increase model capacity
Balanced Fit Low Low Model generalizes well to unseen inputs
Overfitting (High Variance) Very Low High Gather more data, apply regularization, or simplify model
Raw accuracy misleads when classes are imbalanced (e.g., 99% normal transactions, 1% fraud). Engineers rely on confusion- matrix metrics instead:
Precision: Of all items predicted positive, how many were truly positive? Minimizes false alarms. Recall (Sensitivity): Of all actual positive cases, how many did the model catch? Crucial in medical screening. F1-Score: The harmonic mean of precision and recall, balancing both error types in a single number.
Ethical AI & Data Leakage Rule Always fit scalers and imputers exclusively on the training split before transforming test data; otherwise, test statistics leak into training and inflate accuracy artificially.