My first AI notebook
This is a text cell. We write notes here.
import seaborn as sns
df = sns.load_dataset("iris")
df.shapeprint("Hello AI World!")Today we will learn what AI is, see where we already use it, and run our first AI program.
→ / Space: next · ←: back · F: full screen
Click a card to see where the AI is.
By the end of today: you can explain AI, ML, DL and DS, and you have a working notebook on Colab.
Humans can see, hear, talk and decide. With AI, a machine can do these things too.
HumanYou see a friend and know who it is.
MachinePhone camera + AI = face unlock
HumanYou hear words and understand them.
MachineAlexa and Google Assistant understand your voice
HumanYou answer a question in your own words.
MachineChatGPT and Claude write answers
HumanYou choose the fastest road to college.
MachineGoogle Maps picks the best route
In one line: AI = a machine doing a task that normally needs human thinking.
Easy to remember: DL is a part of ML. ML is a part of AI.
Rule: IF it has 4 legs
AND a tail → it is a dog
Now we show it a cat. 4 legs ✓ Tail ✓
Machine says: DOG ✗Wrong! A cat also has 4 legs and a tail. Good rules are hard to write.
Now we show it a cat.
Machine says: NOT A DOG ✓It looks different from all the dogs it has seen.
Machine Learning = Way 2. We do not write the rules. We show many examples, and the machine learns by itself. Children learn the same way!
A fruit seller wants a machine that can tell if a mango is ripe.
We give the machine 12 mangoes. For each one we say: ripe or not ripe.
Examples = training dataIt draws a line. Yellow and soft = ripe. Green and hard = not ripe.
Pattern = modelA new mango comes. The machine uses the line to guess: ripe! Click on the chart to test your own mango.
Guess = predictionDeep Learning uses a network with many layers, a little like our brain. Each layer finds something bigger.
Your photo
Why "deep"? Because there are many layers. Real networks can have 100+ layers.
The canteen owner asks: "What should I make more of, and on which day?"
| Day | Samosa | Vada pav | Sandwich |
|---|---|---|---|
| Mon | 120 | 60 | 40 |
| Tue | 90090 | 70 | 45 |
| Wed | 85 | 65 | — ?45 |
| Thu | 80 | 75 | 50 |
| Fri | 60 | 115 | 55 |
Problems: one typing mistake (900 should be 90) and one missing value.Cleaned: mistake fixed and missing value filled.
People wrote the rules. Example: old chess computer, "Press 1" phone menu.
Usually for photos, voice or language
Example: Gmail spam filter, Swiggy delivery time.
Example: face unlock, ChatGPT.
And Data Science? It is about finding answers from data. It can use AI, or just tables and charts. Example: IPL team analysis, our canteen sales.
Try this: ₹80,000 at 3 AM, 1,500 km away, on a new phone.
This is a simple demo. A real bank's AI learns from crores of old payments.
Amazon made an AI to check job applications. It learned from 10 years of old hiring, where most people hired were men. So it gave lower marks to CVs with the word "women's". Amazon stopped using it.
LessonAI copies what is in its data, even the unfair parts.
Researchers tested face AI from big companies. How often it guessed gender wrong:
LessonTest AI on all kinds of people, not only some.
A US company collected billions of photos from social media. It made a face search tool for police. Several European countries fined it.
LessonEven public photos can be misused.
An employee joined a video call with his "boss" and team. All of them were fake, made by AI. He sent about US$25 million (over ₹200 crore) to scammers.
LessonA face and a voice on screen are not proof any more.
Simple, repeated work like data entry is now done by AI. New jobs are growing: data analyst, ML engineer, AI product manager.
LessonPeople who know how to use AI will be in demand.
Think about it: Should our college use face cameras to mark attendance? We will discuss this later in the course.
Pick a real dataset, explore it, train a model, and present what you found.
Build and compare models, then put the best one inside a simple web app.
Your own AI app with a public link. Choose images, text, Generative AI or data.
At the end: a live app with a public link, and projects you can show in interviews.
All free. All used by real AI teams. We will learn them one by one.
When you come back: open your laptop, plug in the charger, and sign in to Google.
You will hear these four names a lot. Here is what each one means.
The language we use to talk to the computer.
Think of it asEnglish or Hindi, but for computers.
A file where code, notes and results sit together.
Think of it asYour lab record book: the experiment, then the result just below it.
A Jupyter Notebook that runs in your browser, on Google's computers.
Think of it asGoogle Docs, but for code.
A website with free data, free notebooks and AI contests.
Think of it asA library + a practice ground for data science.
Colab (short for Colaboratory) is a free tool from Google. You write Python in the browser, and Google's computer runs it.
Only a browser (Chrome) and internet are needed. Nothing to install.
So: Your laptop does almost no work. Even an old or slow laptop can train AI models with Colab!
That is why: we use Colab in class. Anaconda (offline) is optional for home.
This is a text cell. We write notes here.
import seaborn as sns
df = sns.load_dataset("iris")
df.shapeprint("Hello AI World!")Shift + EnterRuns the cell and moves to the next one.
If you skip a cell, the next cell may show an error.
!pip installPut ! before a command to install a library. Example: !pip install seaborn
If you do nothing for a while, Colab disconnects. Reconnect and run the cells again.
Files in the Files panel are deleted when the session ends. Keep your data in Google Drive.
File → Save a copy in Drive, so the notebook is in your own Drive.
Go to colab.research.google.com in Chrome
Use the same Google account for the full course
Click the link in the class group. Then click File → Save a copy in Drive
Click ▶ or press Shift + Enter. Wait for the green tick ✓
A helper will come to you. Do not wait quietly.
Data teams at Netflix, Google and NASA use the same kind of notebook.
At home (optional)Install Anaconda to use Jupyter on your laptop without internet: anaconda.com/download
The model says:
setosa
Nobody wrote these rules. The model found them by looking at 150 flowers. Banks use the same kind of model to decide on loans.
A free website for data science, owned by Google since 2017. Millions of people learn and practise here.
Free, real data to practise on.
ExampleIPL matches, Indian census, movie ratings, air quality
Write and run code in the browser, just like Colab.
BonusFree GPU for about 30 hours every week
Companies share a real problem and data. People compete to build the best model.
ExampleTitanic: the famous practice contest for beginners
Free short courses with certificates.
CoursesPython, Pandas, Intro to Machine Learning and more
Think of Kaggle as: a library (data) + a gym (practice) + a stadium (contests).
Good news: both are free and both use notebooks. Learn one, and you can use the other.
Go to kaggle.com and sign up with Google
Free real data: IPL matches, Indian census, movies, air quality, house prices
Guess who survived using real passenger data. We will use this data soon in class!
The same kind of notebook you used today, made by people around the world
Kaggle is owned by Google. Companies look at Kaggle profiles when they hire.
Before you goFind one dataset you would like to explore in this course.
Search Kaggle for a topic you like.
IPL matches datasetDownload the CSV file and load it in your notebook.
pd.read_csv("matches.csv")Clean the data, draw charts, train a model.
pandas · charts · sklearnPost your notebook on Kaggle or GitHub.
Your project portfolioGoal: by the end of this course, you will have real projects on your Kaggle profile to show companies.
In one line, tell a friend the difference between AI and ML. Use one app as an example.
Write it on paper or post it in the class group.
Today you learned what AI, ML, DL and DS mean, saw AI in apps you use every day, and made your first AI model.
Next class: Python refresher: NumPy.