AI-900 — Fundamental Principles of Machine Learning on Azure
Table of Contents
- Course Overview
- Introduction to Machine Learning
- Types of Machine Learning
- Data Preparation
- Algorithms and Training
- Azure Automated Machine Learning
- Azure Machine Learning Designer
- Classification Models in Detail
- Inference Pipelines and Deployment
- Complete Evaluation Metrics
- AI-900 Exam Tips
1. Course Overview
This course covers the fundamental principles of Machine Learning on Azure and is the second course in the AI-900 exam preparation path.
Main Topics
┌─────────────────────────────────────────────────────────────────┐
│ AI-900 Path — Module 2 │
├─────────────────────────────────────────────────────────────────┤
│ ✔ What Machine Learning is and its uses │
│ ✔ Predicting a numeric value — Regression │
│ ✔ Predicting a category — Classification │
│ ✔ Grouping data — Clustering │
│ ✔ Azure tools for Machine Learning │
└─────────────────────────────────────────────────────────────────┘
2. Introduction to Machine Learning
Machine Learning is a technique that uses mathematics and statistics to create a model capable of predicting unknown values. It relies on historical data to learn patterns and make predictions.
Key Definitions and Terminology
| Term | Definition |
|---|---|
| Dataset | Collection of data, usually in tabular form (rows and columns) containing historical data |
| Feature | Input value used to make a prediction (e.g., engine size, fuel consumption) |
| Label | Value to predict (e.g., car price) |
| Model | File trained with data and an algorithm to recognize patterns |
| Training | Process of the model learning from historical data |
| Prediction | Estimated value produced by the model after deployment |
Complete Machine Learning Flow
flowchart LR
A[Dataset\nHistorical data] --> B[Data\nPreparation]
B --> C[Model\nTraining]
C --> D[Model\nEvaluation]
D --> E{Acceptable\nresults?}
E -- No --> B
E -- Yes --> F[Model\nDeployment]
F --> G[Predictions\nin production]
style A fill:#4A90D9,color:#fff
style F fill:#27AE60,color:#fff
style G fill:#27AE60,color:#fff
style E fill:#F39C12,color:#fff
Azure Services for Machine Learning
| Service | Description |
|---|---|
| Azure Automated ML | Quick start without advanced ML expertise; Azure automatically selects the best algorithm |
| Azure ML Designer | Drag-and-drop interface for building custom ML pipelines |
3. Types of Machine Learning
mindmap
root((Machine Learning))
Supervised
Regression
Predict a numeric value
Ex: Car price
Classification
Binary
2 classes: 0 or 1
Ex: Diabetic / Not diabetic
Multi-class
N classes
Ex: Mood - happy/sad/angry
Unsupervised
Clustering
Group similar items
Ex: Group flowers by characteristics
Specialized
Deep Learning
Artificial neural networks
Unstructured data
Images, video, sound, text
Regression
Regression uses historical data with features to predict a numeric value (label).
Rule to remember: Regression = predict a numeric value
Classification
Classification predicts which category or class an item belongs to.
Binary Classification
Two possible classes: 0 or 1
Example — Diabetes dataset:
| Age | BMI | BloodPressure | PlasmaGlucose | Diabetic (label) |
|---|---|---|---|---|
| 45 | 28.5 | 72 | 148 | 1 (diabetic) |
| 32 | 22.1 | 65 | 95 | 0 (non-diabetic) |
Multi-Class Classification
Multiple possible classes (N > 2). Examples:
- Mood analysis: happy, sad, angry, worried
- Flower recognition by species
Clustering
Clustering groups similar items into clusters based on their features. There is no label to predict.
The algorithm groups penguins by their measurements → Clusters 0, 1, 2
Supervised vs Unsupervised Learning
| Characteristic | Supervised | Unsupervised |
|---|---|---|
| Features | ✅ Yes | ✅ Yes |
| Labels | ✅ Yes | ❌ No |
| Goal | Predict | Group |
| Examples | Regression, Classification | Clustering |
Deep Learning
Deep Learning is a Machine Learning subset using artificial neural networks with multiple layers.
Deep Learning use cases:
- Object detection in images, videos, sounds, text
- Image caption generation
- Automatic speech and text translation
Machine Learning vs Deep Learning
| Criterion | Machine Learning | Deep Learning |
|---|---|---|
| Data volume | Small datasets sufficient | Large volumes required |
| Compute power | Standard machines | High-performance machines |
| Feature identification | Manual (by user) | Automatic (by model) |
| Training time | Minutes to a few hours | Long (hours to days) |
| Output format | Numeric value or class | Text, sound, score, image, etc. |
4. Data Preparation
Before using a dataset for Machine Learning, it often needs to be prepared. This step is critical for prediction quality.
Data Cleaning
Cleaning resolves missing or invalid values (NaN — Not a Number).
Available options:
- Delete rows containing missing values
- Replace missing values with a meaningful value (mean, median, etc.)
Azure ML Designer module: Clean Missing Data
Normalization
Normalization places all values on the same scale (0 to 1) to prevent large values from biasing the model.
Azure ML Designer module: Normalize Data
Data Splitting
The dataset is split into two parts:
Complete Dataset (100%)
├── Training Set (70%) ──► Train the model
└── Validation Set (30%) ──► Test and evaluate the model
Azure ML Designer module: Split Data →
Fraction of rows in first output dataset = 0.7
Feature Selection and Engineering
| Concept | Description | Designer Module |
|---|---|---|
| Feature Selection | Remove irrelevant columns to improve accuracy | Select Columns in Dataset |
| Feature Engineering | Create new features from raw data to increase predictive power | Custom transformation |
5. Algorithms and Training
Microsoft Algorithm Cheat Sheet
flowchart TD
A[What is your goal?] --> B[Predict a numeric\nvalue]
A --> C[Predict between\n2 categories]
A --> D[Predict between\nN categories]
A --> E[Group\nitems]
B --> B1[Linear Regression\nFast Forest Quantile Regression]
C --> C1[Two-Class Logistic Regression\nTwo-Class Boosted Decision Tree]
D --> D1[Multiclass Decision Forest\nMulticlass Neural Network]
E --> E1[K-Means Clustering]
Recommended algorithms in this course:
- Regression: Linear Regression (fast training)
- Binary classification: Two-Class Logistic Regression (fast linear model)
- Clustering: K-Means Clustering (only clustering option in Designer)
6. Azure Automated Machine Learning
Automated ML allows quick start without advanced ML expertise. Azure automatically selects the best algorithm from several.
Automated ML Flow
sequenceDiagram
participant U as User
participant AML as Azure Automated ML
participant C as Compute Cluster
U->>AML: 1. Provide a dataset
U->>AML: 2. Choose the label (value to predict)
U->>AML: 3. Configure limits (e.g., timeout 15 min)
AML->>C: 4. Launch multiple runs with different algorithms
C-->>AML: 5. Results from each algorithm
AML-->>U: 6. Best model selected (e.g., VotingEnsemble)
U->>AML: 7. Deploy the model
AML-->>U: 8. REST endpoint available
Demo: Creating a Regression Model (Bike Rentals)
Objective: Predict the number of bicycle rentals per day based on weather, day, season, etc.
Steps in Azure ML Studio:
1. Azure ML Studio → Automated ML → New Automated ML job
2. Task type: Regression
3. Dataset: bikerentals (web URL, Tabular type)
4. Target column: rentals
5. Limits: Experiment timeout = 15 min, Enable early termination ✅
6. Compute type: Compute Cluster
7. Submit → wait ~30-40 min
Results obtained:
| Metric | Value | Interpretation |
|---|---|---|
| Best algorithm | VotingEnsemble | Combination of multiple models |
| Normalized RMSE | Lower = better | Normalized error between predicted and actual |
| R² Score | Close to 1 = better | Prediction quality |
7. Azure Machine Learning Designer
The Designer offers a drag-and-drop interface for building custom ML pipelines without writing code.
Regression Pipeline — Demo (Automobile Prices)
Objective: Predict a car price based on its characteristics (engine size, weight, etc.)
flowchart TD
A[Automobile Price Data\nDataset] --> B[Select Columns in Dataset\nExclude: normalized-losses]
B --> C[Clean Missing Data\nRemove rows with NaN\nAll columns]
C --> D[Split Data\n70% Training / 30% Validation]
D -- 70% Training --> E[Train Model\nLabel: price]
D -- 30% Validation --> F[Score Model]
G[Linear Regression\nAlgorithm] --> E
E --> F
F --> H[Evaluate Model\nMetrics: R², RMSE]
style A fill:#AED6F1
style G fill:#A9DFBF
style H fill:#FAD7A0
Classification Pipeline — Demo (Census Income)
Objective: Predict whether a person’s income is ≤ $50K or > $50K
flowchart TD
A[Adult Census Income\nDataset] --> B[Select Columns in Dataset\nExclude: race, sex]
B --> C[Clean Missing Data\nAll columns except income\nRemove missing rows]
C --> D[Normalize Data\nColumns: fnlwgt, capital-gain, capital-loss]
D --> E[Split Data\n70% Training / 30% Validation]
E -- 70% Training --> F[Train Model\nLabel: income]
E -- 30% Validation --> G[Score Model]
H[Two-Class Logistic Regression\nAlgorithm] --> F
F --> G
G --> I[Evaluate Model\nConfusion Matrix, AUC, Accuracy]
style A fill:#AED6F1
style H fill:#A9DFBF
style I fill:#FAD7A0
Why exclude race and sex?
Avoid bias in the income prediction model.
Clustering Pipeline
Objective: Group penguins by their physical measurements (without label)
flowchart TD
A[Penguin Dataset] --> B[Select Columns in Dataset]
B --> C[Clean Missing Data]
C --> D[Normalize Data]
D --> E[Split Data\n70% / 30%]
E -- 70% Training --> F[Train Clustering Model\nAll columns\nNo label to specify]
E -- 30% Validation --> G[Assign Data to Clusters]
H[K-Means Clustering\nNumber of centroids = 3] --> F
F --> G
G --> I[Evaluate Model\nClustering metrics]
style A fill:#AED6F1
style H fill:#A9DFBF
style I fill:#FAD7A0
Differences from regression/classification:
| Aspect | Regression / Classification | Clustering |
|---|---|---|
| Algorithm | Linear Regression / Two-Class Logistic | K-Means Clustering |
| Training module | Train Model (1 label column) | Train Clustering Model (all columns) |
| Scoring module | Score Model | Assign Data to Clusters |
| Label required | Yes | No |
8. Classification Models in Detail
Confusion Matrix
The confusion matrix is the main tool for evaluating a classification model.
┌─────────────────────────────────────┐
│ ACTUAL VALUE │
│ Positive (1) │ Negative (0) │
┌───────────────────┼───────────────────┼──────────────────┤
│ PREDICTED Pos(1) │ True Positives │ False Positives │
│ │ (TP) │ (FP) │
│ Neg(0) │ False Negatives │ True Negatives │
│ │ (FN) │ (TN) │
└───────────────────┴───────────────────┴──────────────────┘
Reading the matrix:
| Cell | Name | Meaning |
|---|---|---|
| TP (top-left) | True Positives | Actually diabetic AND predicted diabetic ✅ |
| FP (top-right) | False Positives | Not diabetic BUT predicted diabetic ❌ |
| FN (bottom-left) | False Negatives | Actually diabetic BUT predicted non-diabetic ❌ |
| TN (bottom-right) | True Negatives | Not diabetic AND predicted non-diabetic ✅ |
Exam question type: “How many people are actually diabetic but the model predicted them as non-diabetic?”
Answer: Look for Actual Positive column + Predicted Negative row = False Negatives (FN)
Classification Metrics
| Metric | Formula | Interpretation |
|---|---|---|
| Accuracy | (TP + TN) / Total | Proportion of correct predictions (0→1, higher = better) |
| Precision | TP / (TP + FP) | Among predicted positives, how many are actually positive |
| Recall | TP / (TP + FN) | Among actual positives, how many were correctly identified |
| F1 Score | 2 × (Precision × Recall) / (Precision + Recall) | Harmonic mean of Precision and Recall (0→1) |
| AUC | Area under ROC curve | Overall model quality, threshold-independent (0→1) |
9. Inference Pipelines and Deployment
A training pipeline trains the model. An inference pipeline allows using the trained model to make predictions in production.
Inference Pipeline Types
| Type | Usage | Deployment |
|---|---|---|
| Real-time Inference | Few predictions at a time | Azure Container Instance or AKS |
| Batch Inference | Many predictions at once | Batch compute |
Training vs Inference Pipeline Differences
| Aspect | Training Pipeline | Inference Pipeline |
|---|---|---|
| Purpose | Train the model | Make predictions |
| Dataset | All columns (features + label) | Features only (no label) |
| Evaluate module | ✅ Present | ❌ Removed |
| Web Service Input | ❌ Absent | ✅ Present |
| Web Service Output | ❌ Absent | ✅ Present |
10. Complete Evaluation Metrics
Regression Metrics
| Metric | Optimal | Description |
|---|---|---|
| Mean Absolute Error (MAE) | → 0 | Average of absolute errors (in same unit as label) |
| Root Mean Squared Error (RMSE) | → 0 | Root of mean squared error (penalizes large errors more) |
| Relative Squared Error (RSE) | → 0 | RSE relative to variance |
| Relative Absolute Error (RAE) | → 0 | RAE relative to mean |
| Coefficient of Determination (R²) | → 1 | Proportion of variance explained by the model |
Classification Metrics
| Metric | Optimal | Description |
|---|---|---|
| Accuracy | → 1 | Proportion of correct predictions |
| Precision | → 1 | Among predicted positives, how many are actually positive |
| Recall | → 1 | Among actual positives, how many were identified |
| F1 Score | → 1 | Harmonic mean of Precision and Recall |
| AUC | → 1 | Area under ROC curve |
Clustering Metrics
| Metric | Optimal | Description |
|---|---|---|
| Average Distance to Cluster Center | → 0 | Average distance of points to their cluster center |
| Average Distance to Other Centers | → large | Average distance to OTHER cluster centers |
| Number of Points | — | Number of points in each cluster |
| Combined Evaluation | — | Weighted combination of the above metrics |
11. AI-900 Exam Tips
Key Terms to Know
| Term | Quick Definition |
|---|---|
| Regression | Predict a numeric value (e.g., price, temperature, count) |
| Classification | Predict a category (e.g., yes/no, type A/B/C) |
| Clustering | Group similar items without labels |
| Supervised Learning | Uses features AND labels |
| Unsupervised Learning | Uses features WITHOUT labels |
| True Positive (TP) | Correctly predicted as positive |
| False Positive (FP) | Wrongly predicted as positive |
| False Negative (FN) | Wrongly predicted as negative |
| True Negative (TN) | Correctly predicted as negative |
| Accuracy | (TP + TN) / Total predictions |
| AUC | Measure of overall classification quality |
Summary Mind Map
mindmap
root((Azure ML Fundamentals))
Machine Learning
Uses math and statistics
Predicts unknown values
Based on historical data
Prediction Types
Numeric value → Regression
Category → Classification
Grouping → Clustering
Complex patterns → Deep Learning
Azure Tools
Automated ML
Fast and automatic
ML Designer
Drag-and-drop
More control
Deployment
Inference Pipeline
ACI for testing
AKS for production
REST API for teams
AI-900 Path — Next Steps
| # | Module | Topic |
|---|---|---|
| 1 | ✅ Completed | AI Workloads and Considerations |
| 2 | ✅ Completed | Fundamental Principles of Machine Learning |
| 3 | ➡️ Next | Computer Vision Workloads on Azure |
| 4 | 📜 | Natural Language Processing Workloads |
| 5 | 📜 | Conversational AI Workloads |
References
- Official documentation — Evaluate Model component (Azure ML)
- Metrics for classification models
- Metrics for clustering models
- Azure Machine Learning Designer — Available Components
Search Terms
ai-900 · azure · fundamental · principles · machine · ai · services · artificial · intelligence · generative · classification · metrics · pipeline · regression · clustering · data · inference · automated · deep · flow · types