AI

Semi-Supervised Learning

Semi-Supervised Learning #

  • A combination of labelled and unlabelled data.
  • Useful when labelling large datasets is expensive or time-consuming.
  • Works well with high-volume datasets (e.g. millions of images).
  • Only a small fraction of data is labelled (e.g. a few thousand).
  • The algorithm learns from both labelled examples and structure in unlabelled data.
  • Ideal for medical imaging where labelled data is limited.
  • For example, a radiologist can label a small set of medical scans,
    and the model uses that to learn from thousands of unlabelled scans.
  • Helps improve accuracy and generalisation with minimal manual effort.

Home | Machine Learning

Machine Learning

Machine Learning #

stateDiagram-v2

    %% ===== CLASS DEFINITIONS (Math-based colours) =====
    classDef algebra fill:#cfe8ff,stroke:#1e3a8a,stroke-width:1px
    classDef probability fill:#d1fae5,stroke:#065f46,stroke-width:1px
    classDef geometry fill:#ffedd5,stroke:#9a3412,stroke-width:1px
    classDef logic fill:#ede9fe,stroke:#5b21b6,stroke-width:1px
    classDef category font-style:italic,font-weight:bold,fill:#aaaaaa,stroke:#374151,stroke-width:3px

    %% ===== ROOT =====
    ML: Machine Learning

    %% ===== SUPERVISED =====
    ML --> SL:::category
    SL: Supervised Learning

    SL --> Regression
    Regression --> LR:::algebra
    LR: Linear Regression

    LR --> NN:::algebra
    NN: Neural Network

    NN --> DT:::logic
    DT: Decision Tree

    SL --> Classification
    Classification --> NB:::probability
    NB: Naive Bayes

    NB --> KNN:::geometry
    KNN: k-Nearest Neighbours

    KNN --> SVM:::algebra
    SVM: Support Vector Machine
    
    %% ===== UNSUPERVISED =====
    ML --> USL:::category
    USL: Unsupervised Learning

    USL --> Clustering
    Clustering --> KM:::geometry
    KM: K-Means

    KM --> GMM:::probability
    GMM: Gaussian Mixture Model

    GMM --> HMM:::probability
    HMM: Hidden Markov Model

    %% ===== REINFORCEMENT =====
    ML --> RL:::category
    RL: Reinforcement Learning

    RL --> DM:::logic
    DM: Decision Making

Mathematical Legend

Algebra / Linear Algebra (Blue) #

Used heavily when models rely on:

Gradients of Vector-Valued and Matrix Functions

Gradients of Vector-Valued and Matrix Functions #

Covers gradients when outputs or parameters are vectors/matrices.

If f: R^n -> R^m, the derivative is the Jacobian.

[ J = \begin{bmatrix} \frac{\partial f_1}{\partial x_1} & \dots & \frac{\partial f_1}{\partial x_n} \ \vdots & \ddots & \vdots \ \frac{\partial f_m}{\partial x_1} & \dots & \frac{\partial f_m}{\partial x_n} \end{bmatrix} ]

For scalar f(x):

[ H = \nabla^2 f ]

Hessian captures curvature.

Generative AI

Generative AI #

Generative Artificial Intelligence (GenAI) refers to a class of AI systems that can generate new content such as text, images, audio, video, or code, rather than only making predictions or classifications.

GenAI systems learn patterns and representations from large datasets and use them to produce novel outputs that resemble the data they were trained on.


How Generative AI Differs from Traditional AI #

Traditional AIGenerative AI
Predicts or classifiesGenerates new content
Task-specific modelsGeneral-purpose models
Fixed outputsOpen-ended outputs
Often rule-basedData-driven and probabilistic

Core Idea of Generative AI #

Instead of learning “what label to assign”, Generative AI learns “how data is structured” and then creates new data following that structure.

Reinforcement Learning

Reinforcement Learning (RL) #

RL is learning by trial and error.

Reinforcement Learning (RL) is a type of machine learning where an autonomous agent learns to make decisions by interacting with an environment.

Instead of being told the correct answer, the agent:

  • takes actions
  • observes outcomes
  • receives rewards or penalties
  • gradually learns a strategy that maximises long-term reward

Reinforcement Learning teaches an agent how to act, not what to predict.

Deep Reinforcement Learning

Deep Reinforcement Learning #

Deep Reinforcement Learning (DRL) studies how an agent learns to make a sequence of decisions by interacting with an environment and receiving feedback through rewards.

Reinforcement learning provides the framework for sequential decision-making. Deep learning extends this framework with powerful function approximators that can handle large or complex state and action spaces.

Deep Reinforcement Learning = Reinforcement Learning + Deep Neural Networks

The learning path begins with classical reinforcement learning foundations and progresses towards value-based deep learning, policy-gradient methods, model-based approaches, and imitation learning.

Inner Products and Dot Product

Inner Products and Dot Product #

An inner product maps two vectors to a single scalar.

It allows us to measure:

  • similarity
  • vector length
  • projections
  • orthogonality
flowchart TD
T["Inner<br/>products<br/>(types)"] --> DOT["Euclidean<br/>Dot product"]
T --> WIP["Weighted<br/>inner product"]
T --> FN["Function-space<br/>(integral)"]
T --> HERM["Complex<br/>Hermitian"]
T --> MAT["Matrix<br/>inner product<br/>(Frobenius)"]

DOT --> Rn["Vectors in<br/>
<span>
  \( \mathbb{R}^n \)
  </span>

"]
WIP --> SPD["SPD matrix<br/>W"]
FN --> L2["L2 space<br/>functions"]
HERM --> Cn["Vectors in<br/>C^n"]
MAT --> Mnm["Matrices<br/>R^{m×n}"]

style T fill:#90CAF9,stroke:#1E88E5,color:#000

style DOT fill:#C8E6C9,stroke:#2E7D32,color:#000
style WIP fill:#C8E6C9,stroke:#2E7D32,color:#000
style FN fill:#C8E6C9,stroke:#2E7D32,color:#000
style HERM fill:#C8E6C9,stroke:#2E7D32,color:#000
style MAT fill:#C8E6C9,stroke:#2E7D32,color:#000

style Rn fill:#CE93D8,stroke:#8E24AA,color:#000
style SPD fill:#CE93D8,stroke:#8E24AA,color:#000
style L2 fill:#CE93D8,stroke:#8E24AA,color:#000
style Cn fill:#CE93D8,stroke:#8E24AA,color:#000
style Mnm fill:#CE93D8,stroke:#8E24AA,color:#000

Definition #

For vectors
\( \mathbf{a}, \mathbf{b} \in \mathbb{R}^n \)

Natural Language Processing

Natural Language Processing #

Natural Language Processing (NLP) studies how computers can analyse, understand, represent, and generate human language.

It combines ideas from linguistics, computer science, machine learning, and deep learning to work with text and language-based information.

Natural Language Processing = Linguistics + Computation + Machine Learning

The learning path begins with language understanding and vector representations, progresses through language modelling, tagging, and parsing, and then moves towards transformers, knowledge graphs, Retrieval-Augmented Generation, and modern NLP applications.

Artificial and Computational Intelligence

Artificial and Computational Intelligence #

Modular Structure #

1. Introduction #

  • Artificial Intelligence foundations
  • Overview of modern AI
  • AI application domains

2. Introduction to Intelligent Agents #

  • Notion of agents and environments
  • Rationality
  • Nature of environments
  • Structure of agents
  • Problem formulation
  • Uninformed and informed search algorithms
  • Heuristics
  • Greedy Best-First Search
  • A* Search and optimality of A*
  • Heuristic accuracy and algorithm performance
  • Admissible heuristics from relaxed problems
  • Pattern databases and experience
  • Learning heuristics
  • Local search and optimisation
  • Hill Climbing
  • Local Beam Search
  • Genetic Algorithms
  • Ant Colony Optimisation
  • Neural Architecture Search
  • Neuroevolution

4. Game Playing #

  • Minimax Algorithm
  • Alpha-Beta Pruning
  • Monte Carlo Tree Search
  • Stochastic Games

5. Knowledge Representation Using Logic #

  • Propositional and Predicate Logic
  • TT-Entail and theorem proving
  • Logic representation of intelligent agents
  • Proof by resolution
  • DPLL Algorithm
  • Agents based on Propositional Logic
  • Unification
  • Forward Chaining
  • Backward Chaining
  • Resolution

6. Multi-Agent Decision Making #

  • Properties of multi-agent environments
  • Multi-agent planning
  • Non-Cooperative Game Theory
  • Cooperative Game Theory
  • Collective decision making

7. Probabilistic Representation and Reasoning #

  • Representing knowledge in uncertain domains
  • Semantics of Bayesian Networks
  • Exact inference in Bayesian Networks
  • Approximate inference in Bayesian Networks

8. Probabilistic Reasoning Over Time #

  • Time and uncertainty
  • Inference in temporal models
  • Hidden Markov Models
  • Learning HMMs
  • Dynamic Bayesian Networks

9. Ethics in AI #

  • Explainable AI
  • Logically Explained Networks
  • Explainable Bayesian Networks

Experiments #

#Experiment
1Implement Uninformed Search Algorithms such as BFS and DFS
2Implement the A* Algorithm for Informed Search
3Implement Local Search Techniques using a Genetic Algorithm
4Implement the Minimax Algorithm for Adversarial Search in game playing
5Represent knowledge using logic and perform reasoning using Prolog
6Experiment with Bayesian Networks and exact inference
7Experiment with the application of a Hidden Markov Model in Natural Language Processing

Practical Tools #

  • Programming languages: Python, Prolog
  • Tools and libraries: Jupyter, NumPy, SciPy, Pandas, pgmpy, NLTK
  • Environments: Google Colab, SWI-Prolog Online

Book References #

Primary Textbook #

  1. Stuart Russell and Peter Norvig, Artificial Intelligence: A Modern Approach, 4th Edition, Pearson Education, 2020.

Reference Books #

  1. Ryszard S. Michalski, Jaime G. Carbonell and Tom M. Mitchell, Machine Learning: An Artificial Intelligence Approach, Elsevier, 2014.
  2. Dan W. Patterson, Introduction to AI and Expert Systems, Prentice Hall of India, New Delhi, 2010.
  3. Elaine Rich and Kevin Knight, Artificial Intelligence, 2nd Edition, Tata McGraw Hill Publishing Company, New Delhi, 2003.

Home | Artificial Intelligence