Search Header Logo
Lecture 6 - AI and ML

Lecture 6 - AI and ML

Assessment

Presentation

Computers

University

Practice Problem

Hard

Created by

Nabarun Halder

Used 4+ times

FREE Resource

43 Slides • 0 Questions

1

media

Coding For ALL
Artificial Intelligence & Machine Learning

Week 3, Lecture 6

1

2

media

What we will cover in this lecture.

  • Machine Learning – ML

  • Different Types of ML

  • ML Models

  • Why is ML/AI a Big Deal? Why Now?

  • Building AI Systems

2

3

media
media

Machine Learning (ML)

  • enables computers to “learn” from data without being explicitly programmed

    • Sometimes explicitly writing a program is hard/almost impossible

  • ML algorithms identify patterns to make predictions or decisions.

Images Classification (CIFER 10 dataset)

4

media
media

ML Applications: Automatic Speech Recognition and Text to Speech

Source: nvidia

5

media
media
media

ML Application: Recommender systems (you may also like…)

source : Netflix

6

media
media

ML Applications: View synthesis (3D modeling from data)

Representing Scenes as Neural Radiance Fields (NERF) for View Synthesis ECCV 2020

7

media
media

ML Application: Protein 3D Structure prediction from amino acid sequence

8

media
media

ML Application: Precision Agriculture

Source: Agronomy 2018, MDPI

9

media
media

Machine Learning vs Data “Mining”

10

media

Types of Machine Learning

  • Supervised Learning

  • Unsupervised Learning

  • Self-supervised Learning

  • Reinforcement Learning

11

media
media

Supervised Learning

  • Input data and its label is given 

  • Predict the label of new data

  • The label 

    • can be a number - Regression

    • can be a category - Classification 

12

media

Supervised Learning

Predicting house prices

  • Data: Features of houses: size, location, and number of bedrooms etc.

  • Label: selling price of each house

Diagnosing medical conditions

  • Data: Medical images, such as X-rays and MRIs

  • Labels: Whether each image shows signs of a particular medical condition

13

media

Unsupervised Learning

  • In unsupervised learning, the computer is given a dataset of unlabeled data.

  • The goal is to find patterns or structure in the data without being told what to look for.

14

media
media

Unsupervised Learning

How would you group these images?

15

media
media
media

Unsupervised Learning

Group by Gender:

Group 1

Group 2

16

media
media
media

Unsupervised Learning

How about this grouping?

Group 1

Group 2

17

media

Self Supervised Learning

  • We live in the “Big data” era

    • lots of news articles, video data

  • But labeling is hard 

    • labeling each article as sports, political, entertainment

    • Labeling each person / object in the video 

  • Why not design tasks where we have labels in the data itself?

18

media
media

Self Supervised Learning

  • Predict hidden parts of the input (in gray) from visible parts of the input (in green)

  • In NLP 

    • Hide (mask) some words of a sentence

    • predict them from the remaining words.

    • That’s how large language models “learn language”

  • Video Processing

    • Predicting past or future (hidden data) frames from current frames (observed data)

19

media

Reinforcement learning

  • computer learns by trial & error by interacting with the environment

  • goal is to maximize the expected reward or utility signal received

  • This is much like how you can train a dog to do tricks

20

media
media

Pacman has to “learn” by playing the game by himself

  • Reward: eating the points

  • Reward: bumping into the ghosts


Important: Pacman does not know any of this  at the beginning


21

media

Reinforcement learning

Training a self-driving car:

  • The algorithm learns to make decisions about acceleration, braking, and steering based on the feedback it receives from the car's sensors.

22

media

Reinforcement learning

In chatbots:

  • Reinforcement learning used in AI chatbots 

    • So that they do respond the way we want them to

    • By providing feedback (reward) on what is generates

  • without human provided feedback these chatbots behave 

    • quite erratically 

    • can pick up pretty toxic behavioral traits.

23

media

Machine Learning Models

K-nearest neighbors (KNN)

Decision trees

Neural Networks


24

media
media

K-nearest neighbors (KNN)

Based on closeness or
similarity what is the class of
the green circle?

25

media
media

Decision Tree

Age

Income

Avg Monthly
Savings Amt

Credit Duration

Decision

38

162000

650

37

?

26

media
media

Neural Networks and Deep Learning

Deep neural networks have many hidden layers or 

many many neuron connected in special ways ML for deep neural networks are called deep learning

27

media
media

28

media

Generative Models

learn the underlying patterns or distributions of data in order to generate new, similar data.

In essence, it's like teaching a computer to “dream up” its own data based on what it has seen before. 

LLMs, Image Generators - usually a Deep neural network

29

media

LLM based Model: ChatGPT

Prompt: Write a poem about autumn evening.

ChatGPT:
As daylight wanes, a crimson sky unfurls,
Autumn whispers secrets to the world,
Leaves rustle, painting paths in gold,
A crisp embrace, the air's story told,
Twilight's hush in the evening's reign,
A fleeting dance before night's domain.


30

media

LLM based Model: ChatGPT

Prompt: You are an expert translator. Your task is to translate the following
text to Bangla. Please make sure the translated text is natural, easy to
follow, and has literary quality to it.

[...A generative models is…]

31

media

LLM based Model: ChatGPT

ChatGPT:

একটি জেনারেটিভ মডেল হল মেশিন লার্নিং মডেলের এক ধরন, যা তথ্যের নিচে লুকিয়ে থাকা প্যাটার্ন বা তথ্যের বিতর্কিত বিতর্কিত ভাগবিভাজন শেখার লক্ষ্যে তার সামনে নতুন, অনুরূপ তথ্য তৈরি করা। মূলত, এটি হলো যে, যেটি কোম্পিউটারকে শিখানোর মতো, যাতে তা আগে দেখা তথ্য ভিত্তিক নিজের তথ্য সৃষ্টি করতে পারে। 

Not quite up to the mark is it? what do you think?


32

media

LLM models

Can generate code


DO NOT just copy paste code

Must check the reliability of the code

Prompt: Write a python code to find prime numbers


media

33

media

Diffusion Based Model: DALL-E

Prompt: A boy flying a kite in the paddy field, in the summer afternoon, create the art in the style of Van Gogh.

DALL-E:

media

However, these models can produce incoherent images too. See 5 things AI image generators still struggle with | Digital Trends

34

media
media

Distinguishing the terms ML, DL & AI

35

media

Why is AI / ML a big deal?

  • Improved decision-making

    • analyzes very large amounts of data and 

    • identify patterns that humans might miss

  • Automation

    • Driving cars, translating speech, answering queries 

    • Does the repetitive or time-consuming tasks

    • freeing up human workers to focus on more creative and strategic work.

36

media

Why is AI / ML a big deal?

  • Personalization

    • personalize products, services, and recommendations to individual users

    • providing a more tailored experience.

  • Innovation

    • ML is driving innovation in a wide range of industries, leading to new products, services, and processes.

37

media

Why now?

Because a couple of technologies

Huge increase in computing processing power

  • NVIDIA A100, Google TPU v3, 4 are some of the popular GPUs in the field of AI

  • It 312 teraFLOPS (trillion floating point operation per seconds)

38

media

Why now?

Rise of big data

  • Sources of big data, including, social media, IoT systems, Banking, Audio Video, Government and Public Data, Research and Scientific data, and so on.

39

media

Why now?

Adoption of cloud-based computing

  • Cloud computing is the on-demand availability of computing resources

    • storage and infrastructure available over the internet

  • cloud computing platforms

    • Amazon web services (AWS)

    • Microsoft Azure

    • Google Cloud Platform (GCP)

40

media

Ethical issues and other Problems with AI

  • AI might create loss of jobs and more inequality

  • AI systems can be biased

  • Introduces complicated copyright issues

  • Current AI models are black boxes

  • Who is responsible for mistakes made by AI systems?

  • Harmful content creation using AI

  • The value alignment problem

  • AI singularity?

41

media

Few Discussion Points

  • Which jobs are more likely to be replaced by AI?

  • Demands for which jobs are likely to grow?

  • What new jobs can AI create?

  • Who should be responsible for making AI systems safe, unbiased? 

42

media
media

ML Lifecycle in


Business organizations


Software Startups

Source: ml-ops.org

43

media

Skills required

  • programming (some popular languages for AI/ML are Python, R)

  • mathematics (linear algebra, calculus, statistics)

  • machine learning concepts

  • Knowledge in application domain - bring in domain experts

  • Data Engineering skills - data wrangling (cleaning, transforming), data pipeline development

  • DevOPs: these are the skill required to deploy large AI systems

  • Understanding of the ethical considerations of the project, and 

  • ongoing learning through courses, projects, and staying updated with the latest advancements.

media

Coding For ALL
Artificial Intelligence & Machine Learning

Week 3, Lecture 6

1

Show answer

Auto Play

Slide 1 / 43

SLIDE