0% found this document useful (0 votes)
2 views5 pages

ml_notes

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

ml_notes

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Machine Learning Fundamentals: From Data to

Evaluation
Original learning material covering machine learning workflow, preprocessing, supervised learning, clustering and
model evaluation.

Original educational reference material


1. Machine Learning Workflow
Problem Definition
Machine learning begins with a clear target. Classification predicts a category, regression predicts a numeric value,
ranking orders alternatives, and clustering discovers groups without labeled targets.

The business or scientific objective should be translated into a measurable evaluation criterion before selecting a
model.

Dataset Preparation
A dataset normally contains features and a target. Data should be inspected for missing values, duplicates,
inconsistent formats and suspicious outliers before training.

Train, validation and test sets help separate model development from final evaluation. The test set should not
repeatedly influence model choices.

Data Leakage
Leakage occurs when information unavailable at prediction time enters the training process. Leakage can produce
impressive validation scores that fail in real use.

Preprocessing steps such as scaling and imputation should be fitted on training data and then applied to validation or
test data.
2. Supervised Learning
Regression
Linear regression models a numeric target as a weighted combination of input features. Mean Squared Error strongly
penalizes larger mistakes, while Mean Absolute Error is easier to interpret in the original unit.

Regularization can reduce overly large coefficients. L1 regularization can encourage sparse coefficients, while L2
regularization generally shrinks them smoothly.

Classification
Logistic regression estimates class probabilities. Decision trees learn rules through recursive splits. Ensemble
methods combine multiple models to improve robustness.

For imbalanced classification, accuracy alone can be misleading. Precision, recall, F1-score and suitable
threshold-based analysis provide additional information.

Bias and Variance


High bias indicates a model is too simple to capture useful structure. High variance indicates strong sensitivity to the
training sample. Cross-validation helps estimate how well a model generalizes.
3. Unsupervised Learning
Clustering
Clustering groups observations based on similarity. K-means repeatedly assigns points to the nearest centroid and
updates centroids until convergence.

The number of clusters should be chosen using domain knowledge and diagnostic methods rather than blindly
accepting a single metric.

Dimensionality Reduction
Dimensionality reduction compresses information into fewer variables. Principal Component Analysis identifies
directions that explain high variance under its mathematical assumptions.

Lower-dimensional representations can support visualization, storage efficiency and sometimes faster model training.

Similarity and Distance


Euclidean distance is common for numeric features, but distance measures should match the data type and scale.
Feature scaling can be important because large-scale variables may dominate distance calculations.
4. Evaluation and Deployment
Evaluation Metrics
A confusion matrix summarizes true positives, true negatives, false positives and false negatives. Precision measures
the fraction of predicted positives that are correct, while recall measures the fraction of actual positives detected.

ROC-AUC summarizes ranking quality across thresholds, but for strongly imbalanced problems precision-recall
analysis can be more informative.

Model Monitoring
A deployed model can degrade when input distributions or user behavior change. Monitoring should track data
quality, prediction distributions, latency and task-specific performance where labels become available.

Retraining should be triggered by meaningful evidence of drift or performance decline rather than by an arbitrary
schedule alone.

Responsible Use
Models should be tested for reliability, unintended bias, privacy risks and explainability requirements appropriate to
the application. A technically accurate model can still be unsuitable if its operational consequences are poorly
understood.

You might also like