Lab 01

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 35

AI Lab 01

Lab introduction, and Python basics


Outline
1. Course plan
2. Required software
3. Python basics
Course Plan
Course Plan (Lab)
Week Topic
1 Python basics
2 ML introduction, getting datasets, pandas
Building first model (KNN), training, validation, and
3
test
Naive Bayes Classifiers, Model selection and
4
comparison
5 Data preprocessing
6 Decision Trees
7 Regression
8 Logistic Regression + Random Forest
9 K-means Clustering
10 Project Discussion
Required software
Required software for labs

Download from here:


https://www.anaconda.com/product
s/individual
Anaconda Distribution
We use Jupyter Notebook
Jupyter Notebook
Python basics
Printing output
Comments
Variables, arithmetic operators
Spaces are important in Python
Error message

Read from
bottom to top
Error message

Error reason
(this means our
spaces are wrong)
Error message

line
Error message

here it is
Error message

Filename
(this means our cell)
Error message

Line number
Error message

If this is not your code


(like when you import
a library), continue
reading from bottom
to top
Line numbers
You can show line numbers if they are hidden
Order of running cells is important
Order of running cells is important

This means either we forgot to run the previous cell or


the variable name is wrong
(or the variable is not defined at all)
Order of running cells is important

We must run this first


Variables are case-sensitive
Variables are case-sensitive

Again, this means either we forgot to run the previous


cell or the variable name is wrong
(or the variable is not defined at all)
Variables are case-sensitive
The names are different
If statement
Data structures
Length of a list (or a tuple)
For loop
For loop
While loop
Functions
Further reading
• W3Schools:
• https://www.w3schools.com/python/default.asp
• Youtube:
• https://youtube.com/playlist?list=PLIjLGHnioqmbI6eSb4tU1VdgOEq8nZaY2
• Feel free to search for more online sources

You might also like