Beginner AI-900

Azure: Fundamental Principles of Machine Learning

Machine-learning principles on Azure — data prep, training, AutoML, the Designer and evaluation metrics.

AI-900 — Fundamental Principles of Machine Learning on Azure


Table of Contents

  1. Course Overview
  2. Introduction to Machine Learning
  3. Types of Machine Learning
  4. Data Preparation
  5. Algorithms and Training
  6. Azure Automated Machine Learning
  7. Azure Machine Learning Designer
  8. Classification Models in Detail
  9. Inference Pipelines and Deployment
  10. Complete Evaluation Metrics
  11. 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

TermDefinition
DatasetCollection of data, usually in tabular form (rows and columns) containing historical data
FeatureInput value used to make a prediction (e.g., engine size, fuel consumption)
LabelValue to predict (e.g., car price)
ModelFile trained with data and an algorithm to recognize patterns
TrainingProcess of the model learning from historical data
PredictionEstimated 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

ServiceDescription
Azure Automated MLQuick start without advanced ML expertise; Azure automatically selects the best algorithm
Azure ML DesignerDrag-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:

AgeBMIBloodPressurePlasmaGlucoseDiabetic (label)
4528.5721481 (diabetic)
3222.165950 (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

CharacteristicSupervisedUnsupervised
Features✅ Yes✅ Yes
Labels✅ Yes❌ No
GoalPredictGroup
ExamplesRegression, ClassificationClustering

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

CriterionMachine LearningDeep Learning
Data volumeSmall datasets sufficientLarge volumes required
Compute powerStandard machinesHigh-performance machines
Feature identificationManual (by user)Automatic (by model)
Training timeMinutes to a few hoursLong (hours to days)
Output formatNumeric value or classText, 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 DataFraction of rows in first output dataset = 0.7

Feature Selection and Engineering

ConceptDescriptionDesigner Module
Feature SelectionRemove irrelevant columns to improve accuracySelect Columns in Dataset
Feature EngineeringCreate new features from raw data to increase predictive powerCustom 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:

MetricValueInterpretation
Best algorithmVotingEnsembleCombination of multiple models
Normalized RMSELower = betterNormalized error between predicted and actual
R² ScoreClose to 1 = betterPrediction 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:

AspectRegression / ClassificationClustering
AlgorithmLinear Regression / Two-Class LogisticK-Means Clustering
Training moduleTrain Model (1 label column)Train Clustering Model (all columns)
Scoring moduleScore ModelAssign Data to Clusters
Label requiredYesNo

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:

CellNameMeaning
TP (top-left)True PositivesActually diabetic AND predicted diabetic ✅
FP (top-right)False PositivesNot diabetic BUT predicted diabetic ❌
FN (bottom-left)False NegativesActually diabetic BUT predicted non-diabetic ❌
TN (bottom-right)True NegativesNot 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

MetricFormulaInterpretation
Accuracy(TP + TN) / TotalProportion of correct predictions (0→1, higher = better)
PrecisionTP / (TP + FP)Among predicted positives, how many are actually positive
RecallTP / (TP + FN)Among actual positives, how many were correctly identified
F1 Score2 × (Precision × Recall) / (Precision + Recall)Harmonic mean of Precision and Recall (0→1)
AUCArea under ROC curveOverall 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

TypeUsageDeployment
Real-time InferenceFew predictions at a timeAzure Container Instance or AKS
Batch InferenceMany predictions at onceBatch compute

Training vs Inference Pipeline Differences

AspectTraining PipelineInference Pipeline
PurposeTrain the modelMake predictions
DatasetAll 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

MetricOptimalDescription
Mean Absolute Error (MAE)→ 0Average of absolute errors (in same unit as label)
Root Mean Squared Error (RMSE)→ 0Root of mean squared error (penalizes large errors more)
Relative Squared Error (RSE)→ 0RSE relative to variance
Relative Absolute Error (RAE)→ 0RAE relative to mean
Coefficient of Determination (R²)→ 1Proportion of variance explained by the model

Classification Metrics

MetricOptimalDescription
Accuracy→ 1Proportion of correct predictions
Precision→ 1Among predicted positives, how many are actually positive
Recall→ 1Among actual positives, how many were identified
F1 Score→ 1Harmonic mean of Precision and Recall
AUC→ 1Area under ROC curve

Clustering Metrics

MetricOptimalDescription
Average Distance to Cluster Center→ 0Average distance of points to their cluster center
Average Distance to Other Centers→ largeAverage distance to OTHER cluster centers
Number of PointsNumber of points in each cluster
Combined EvaluationWeighted combination of the above metrics

11. AI-900 Exam Tips

Key Terms to Know

TermQuick Definition
RegressionPredict a numeric value (e.g., price, temperature, count)
ClassificationPredict a category (e.g., yes/no, type A/B/C)
ClusteringGroup similar items without labels
Supervised LearningUses features AND labels
Unsupervised LearningUses 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
AUCMeasure 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

#ModuleTopic
1✅ CompletedAI Workloads and Considerations
2✅ CompletedFundamental Principles of Machine Learning
3➡️ NextComputer Vision Workloads on Azure
4📜Natural Language Processing Workloads
5📜Conversational AI Workloads

References


Search Terms

ai-900 · azure · fundamental · principles · machine · ai · services · artificial · intelligence · generative · classification · metrics · pipeline · regression · clustering · data · inference · automated · deep · flow · types

Interested in this course?

Contact us to book it or get a custom training plan for your team.