Welcome to AI Programming with Python
Why Python Programming
Data Types and Operators
03.2 Quiz: Arithmetic Operators
06.2 Quiz: Variables and Assignment Operators
09. Quiz: Integers and Floats
11. Quiz: Booleans, Comparison Operators, and Logical Operators
14. Quiz: Strings
14.3 Quiz: Strings
17. Quiz: Type and Type Conversion
20. String Methods
23. Quiz: Lists and Membership Operators
26. Quiz: List Methods
28. Quiz: Tuples
30. Quiz: Sets
32. Quiz: Dictionaries and Identity Operators
34. Quiz: More With Dictionaries
36. Quiz: Compound Data Structures
Control Flow
07. Boolean Expressions for Conditions1:43
07.2 Boolean Expressions for Conditions2:18
07.3 Boolean Expressions for Conditions1:28
08. Quiz: Boolean Expressions for Conditions
09. Solution: Boolean Expressions for Conditions
10. For Loops5:24
11. Practice: For Loops
11.2 Practice: For Loops
12. Solution: For Loops Practice
13. Quiz: For Loops
13. Quiz: For Loops
13.2 Quiz: For Loops
13.3 Quiz: For Loops
13.4 Quiz: For Loops
14. Solution: For Loops Quiz
15. Quiz: Match Inputs To Outputs
15. Quiz: Match Inputs To Outputs
16. Building Dictionaries
17. Iterating Through Dictionaries with For Loops
17.2 Iterating Through Dictionaries with For Loops
18. Quiz: Iterating Through Dictionaries
18.2 Quiz: Iterating Through Dictionaries
18.3 Quiz: Iterating Through Dictionaries
19. Solution: Iterating Through Dictionaries
20. While Loops2:19
21. Practice: While Loops
21.2 Practice: While Loops
22. Solution: While Loops Practice
23. Quiz: While Loops
23.2 Quiz: While Loops
23.3 Quiz: While Loops
24. Solution: While Loops Quiz
25. Break, Continue3:00
25.2 Break, Continue
26. Quiz: Break, Continue
27. Solution: Break, Continue
28. Zip and Enumerate
29. Quiz: Zip and Enumerate
29.2 Quiz: Zip and Enumerate
29.3 Quiz: Zip and Enumerate
29.4 Quiz: Zip and Enumerate
29.5 Quiz: Zip and Enumerate
30. Solution: Zip and Enumerate
31. List Comprehensions2:21
32. Quiz: List Comprehensions
32.2 Quiz: List Comprehensions
32.3 Quiz: List Comprehensions
33. Solution: List Comprehensions
34. Conclusion0:21
Functions
02. Defining Functions4:04
02. Defining Functions
02.2 Defining Functions
02.3 Defining Functions1:34
03. Quiz: Defining Functions
03.2 Quiz: Defining Functions
04. Solution: Defining Functions
05. Variable Scope1:02
06. Variable Scope
07. Solution: Variable Scope
08. Documentation2:06
09. Quiz: Documentation
10. Solution: Documentation
11. Lambda Expressions1:48
12. Quiz: Lambda Expressions
12.2 Quiz: Lambda Expressions
13. Solution: Lambda Expressions
14. [Optional] Iterators and Generators2:11
15. [Optional] Quiz: Iterators and Generators
15.2 [Optional] Quiz: Iterators and Generators
16. [Optional] Solution: Iterators and Generators
17. [Optional] Generator Expressions
18. Conclusion0:31
19. Further Learning
Scripting
01. Introduction0:29
02. Python Installation
03. Install Python Using Anaconda
04. [For Windows] Configuring Git Bash to Run Python
05. Running a Python Script1:35
06. Programming Environment Setup2:57
07. Editing a Python Script
07. Editing a Python Script
08. Scripting with Raw Input
09. Quiz: Scripting with Raw Input
10. Solution: Scripting with Raw Input
11. Errors and Exceptions1:57
12. Errors and Exceptions
13. Handling Errors1:33
13.2 Handling Errors2:02
14. Practice: Handling Input Errors
15. Solution: Handling Input Errors
16. Accessing Error Messages
17. Reading and Writing Files3:41
17.2 Reading and Writing Files1:17
17.3 Reading and Writing Files1:49
18. Quiz: Reading and Writing Files
18.2 Quiz: Reading and Writing Files
19. Solution: Reading and Writing Files
20. Importing Local Scripts4:47
21. The Standard Library2:17
22. Quiz: The Standard Library
22.2 Quiz: The Standard Library
22.2 Quiz: The Standard Library
23. Solution: The Standard Library
24. Techniques for Importing Modules1:36
24.2 Techniques for Importing Modules3:15
25. Quiz: Techniques for Importing Modules
26. Third-Party Libraries2:35
27. Experimenting with an Interpreter2:43
28. Online Resources
28. Online Resources
28.2 Online Resources
29. Conclusion0:19
Lab Classifying Images
01. Instructor
02. Lab Description
03. Lab Instructions1:40
04. Workspace How-to5:09
05. Workspaces: Best Practices
06. Lab Workspace
07. Timing Code
07.2 Timing Code2:06
08. Command Line Arguments3:06
08.2 Command Line Arguments
09. Mutable Data Types and Functions6:12
10. Creating Pet Image Labels – Part 1
11. Creating Pet Image Labels – Part 2
11.2 Creating Pet Image Labels – Part 23:33
12. Classifying Images – Part 1
13. Classifying Images – Part 2
13.2 Classifying Images – Part 25:16
14. Classifying Labels as Dogs
14.2 Classifying Labels as Dogs5:00
15. Calculating Results
15.2 Calculating Results4:45
16. Printing Results
16.2 Printing Results5:38
17. Results
18. Concluding Remarks
19. Lab Solution Workspace
NumPy
01. Instructors
02. Introduction to NumPy
03. Why Use NumPy?3:08
04. Creating and Saving NumPy ndarrays5:44
05. Using Built-in Functions to Create ndarrays9:33
06. Create an ndarray
06. Solution. Create an ndarray
07. Accessing, Deleting, and Inserting Elements Into ndarrays5:37
08. Slicing ndarrays6:24
09. Boolean Indexing, Set Operations, and Sorting3:14
10. Manipulating ndarrays
10. Solution. Manipulating ndarrays
11. Arithmetic operations and Broadcasting00:00
12. Creating ndarrays with Broadcasting
12. Solution. Creating ndarrays with Broadcasting
13. Getting Set Up for the Mini-Project
14. Mini-Project: Mean Normalization and Data Separation
Pandas
01. Instructors
02. Introduction to Pandas
03. Why Use Pandas?
04. Creating Pandas Series2:28
05. Accessing and Deleting Elements in Pandas Series2:34
06. Arithmetic Operations on Pandas Series2:11
07. Manipulate a Series
07. Solution. Manipulate a Series
08. Creating Pandas DataFrames5:05
09. Accessing Elements in Pandas DataFrames4:30
10. Dealing with NaN00:00
11. Manipulate a DataFrame
11. Solution. Manipulate a DataFrame
12. Loading Data into a Pandas DataFrame4:06
13. Getting Set Up for the Mini-Project
14. Mini-Project: Statistics From Stock Data
Matplotlib and Seaborn Part 1
01. Instructor
03. Tidy Data
04. Bar Charts2:28
04.2 Bar Charts4:13
05. Absolute vs. Relative Frequency1:04
05.2 Absolute vs. Relative Frequency00:00
06. Counting Missing Data
07. Bar Chart Practice
08. Pie Charts00:00
09. Histograms00:00
09.2 Histograms00:00
10. Histogram Practice
11. Figures, Axes, and Subplots
11. Figures, Axes, and Subplots
11.2 Figures, Axes, and Subplots
12. Choosing a Plot for Discrete Data
13. Descriptive Statistics, Outliers and Axis Limits00:00
13.2 Descriptive Statistics, Outliers and Axis Limits00:00
14. Scales and Transformations00:00
14.2 Scales and Transformations00:00
15. Scales and Transformations Practice
16. Lesson Summary00:00
17. Extra Kernel Density Estimation
Matplotlib and Seaborn Part 2
02. Scatterplots and Correlation2:38
02.2 Scatterplots and Correlation00:00
03. Overplotting, Transparency, and Jitter00:00
03.2 Overplotting, Transparency, and Jitter00:00
04. Heat Maps00:00
04.2 Heat Maps00:00
05. Scatterplot Practice
06. Violin Plots00:00
06.2 Violin Plots00:00
07. Box Plots00:00
07.2 Box Plots00:00
08. Violin and Box Plot Practice
09. Clustered Bar Charts00:00
09.2 Clustered Bar Charts00:00
10. Categorical Plot Practice
11. Faceting00:00
11.2 Faceting00:00
12. Adaptation of Univariate Plots00:00
12.2 Adaptation of Univariate Plots00:00
13. Line Plots00:00
13.2 Line Plots00:00
14. Additional Plot Practice
15. Lesson Summary00:00
16. Postscript Multivariate Visualization
17. Extra Swarm Plots
18. Extra Rug and Strip Plots
Introduction
01. Our Goal
02. Instructors
03. Essence of Linear Algebra4:26
04. Structure of this lesson
05. Working with Equations
06. Try our workspace out!00:00
07. Try our workspace again!00:00
Vectors
02. Vectors, what even are they Part 21:44
03. Vectors, what even are they Part 34:05
04. Vectors- Mathematical definition
05. Transpose
06. Magnitude and Direction
07. Vectors- Quiz 1
08. Operations in the Field
09. Vector Addition
10. Vectors- Quiz 2
11. Scalar by Vector Multiplication
12. Vectors Quiz 3
13. Vectors Quiz Answers
Linear Combination
01. Linear Combination. Part 100:00
02. Linear Combination. Part 200:00
03. Linear Combination and Span
04. Linear Combination -Quiz 1
05. Linear Dependency
06. Solving a Simplified Set of Equations
07. Linear Combination – Quiz 2
08. Linear Combination – Quiz 3
Linear Transformation and Matrices
01. What is a Matrix
02. Matrix Addition
03. Matrix Addition Quiz
04. Scalar Multiplication of Matrix and Quiz
05. Multiplication of a Square Matrices
06. Square Matrix Multiplication Quiz
07. Matrix Multiplication – General
08. Matrix Multiplication Quiz
09. Linear Transformation and Matrices . Part 100:00
10. Linear Transformation and Matrices. Part 200:00
11. Linear Transformation and Matrices. Part 300:00
12. Linear Transformation Quiz Answers
Vectors Lab
01. Vectors Lab
02. Vectors Lab Solution00:00
02.2 Vectors Lab Solution00:00
Linear Combination Lab
01. Linear Combination
02. Linear Combination Lab Solution00:00
Linear Mapping Lab
01. Lab Description
02. Visualizing Matrix Multiplication
03. Matrix Multiplication Lab
04. Linear Mapping Lab Solution1:17
04.2 Linear Mapping Lab Solution00:00
04.3 Linear Mapping Lab Solution00:00
Linear Algebra in Neural Networks
01. Instructor
02. Brief Introduction
03. What is a Neural Network0:30
04. How Are The Neurons Connected
05. Putting The Pieces Together00:00
06. The Feedforward Process- Finding h00:00
07. The Feedforward Process- Finding y00:00
Introduction to Neural Networks
01. Instructor
02. Introduction1:54
03. Classification Problems 11:38
03. Classification Problems 1
04. Classification Problems 21:04
05. Linear Boundaries2:43
05. Linear Boundaries
06. Higher Dimensions2:01
06. Higher Dimensions
07. Perceptrons00:00
07. Perceptrons
08. Why Neural Networks00:00
09. Perceptrons as Logical Operators00:00
09. Perceptrons as Logical Operators Lab
09.2 Perceptrons as Logical Operators00:00
09.2 Perceptrons as Logical Operators Lab
09.2 Perceptrons as Logical Operators Lab
09.3 Perceptrons as Logical Operators Lab
09.4 Perceptrons as Logical Operators00:00
09.5 Perceptrons as Logical Operators
09.5 Perceptrons as Logical Operators
10. Perceptron Trick00:00
10. Perceptron Trick
10.2 Perceptron Trick0:13
10.3 Perceptron Trick2:59
10.3 Perceptron Trick
11. Perceptron Algorithm00:00
11. Perceptron Algorithm Lab
12. Non-Linear Regions00:00
13. Error Functions00:00
14. Log-loss Error Function00:00
14. Log-loss Error Function
15. Discrete vs Continuous00:00
15.2 Discrete vs Continuous00:00
15.2 Discrete vs Continuous
16. Softmax00:00
16.2 Softmax00:00
16.2 Softmax
16.3 Softmax00:00
16.3 Softmax
16.3 Solution. Softmax
17. One-Hot Encoding00:00
18. Maximum Likelihood00:00
18.2 Maximum Likelihood00:00
18.2 Maximum Likelihood
19. Maximizing Probabilities00:00
19.2 Maximizing Probabilities00:00
19.2 Maximizing Probabilities
20. Cross-Entropy 100:00
21. Cross-Entropy 200:00
21.2 Cross-Entropy 200:00
21.2 Cross-Entropy 2 Lab
21.2 Solution. Cross-Entropy 2 Lab
22. Multi-Class Cross Entropy00:00
22. Multi-Class Cross Entropy
23. Logistic Regression00:00
23.2 Logistic Regression00:00
24. Gradient Descent00:00
24.2 Gradient Descent
24.3 Gradient Descent
25. Logistic Regression Algorithm00:00
26. Pre-Lab Gradient Descent
27. Notebook Gradient Descent
28. Perceptron vs Gradient Descent00:00
29. Continuous Perceptrons00:00
30. Non-linear Data00:00
31. Non-Linear Models00:00
32. Neural Network Architecture00:00
32.2 Neural Network Architecture00:00
32.3 Neural Network Architecture00:00
32.4 Neural Network Architecture00:00
33. Feedforward00:00
33.2 Feedforward00:00
32.2 Neural Network Architecture
34. Backpropagation00:00
34.2 Backpropagation00:00
34.3 Backpropagation00:00
34.4 Backpropagation00:00
35. Pre-Lab Analyzing Student Data
36. Notebook Analyzing Student Data
37. Outro
Implementing Gradient Descent
01. Mean Squared Error Function
02. Gradient Descent00:00
03. Gradient Descent The Math7:36
04. Gradient Descent The Code
04. Solution. Gradient Descent The Code
05. Implementing Gradient Descent
06. Multilayer Perceptrons00:00
06. Multilayer Perceptrons Lab
07. Backpropagation00:00
07. Backpropagation Lab
08. Implementing Backpropagation
08. Implementing Backpropagation Lab
09. Further Reading
06. Solution. Multilayer Perceptrons Lab
07. Solution. Backpropagation Lab
Training Neural Networks
01. Instructor
02. Training Optimization00:00
03. Testing00:00
04. Overfitting and Underfitting00:00
05. Early Stopping00:00
06. Regularization00:00
06. Regularization
07. Regularization 200:00
08. Dropout00:00
09. Local Minima00:00
10. Random Restart00:00
11. Vanishing Gradient00:00
12. Other Activation Functions00:00
13. Batch vs Stochastic Gradient Descent00:00
14. Learning Rate Decay00:00
15. Momentum00:00
16. Error Functions Around the World00:00
Deep Learning with PyTorch
01. Instructor
02. Introducing PyTorch
03. PyTorch Tensors7:32
04. Defining Networks17:18
05. Training Networks00:00
06. Fashion-MNIST Exercise1:25
07. Inference Validation13:03
08. Saving and Loading Trained Networks00:00
09. Loading Data Sets with Torchvision00:00
10. Transfer Learning00:00
11. Transfer Learning Solution
Create Your Own Image Classifier
01. Instructor
02. Project Intro0:47
03. Introduction to GPU Workspaces
04. Updating to PyTorch
05. Image Classifier – Part 1 – Development
06. Image Classifier – Part 1 – Workspace
07. Image Classifier – Part 2 – Command Line App
08. Image Classifier – Part 2 – Workspace
09. Rubric
Project Description – Create Your Own Image Classifier
Project Rubric – Create Your Own Image Classifier
How Do I Continue From Here
01. Next Steps into the AI World!3:04
Lesson Plan
We offers the AI Programming with Python Nanodegree to a wide range of students. As such, our students come from various backgrounds. Some of you will have had previous coding experience and some will have had none. For this reason we offer two suggested lesson plans. One lesson plan will apply to those of you with previous coding experience. The other will apply to those of you who feel they need more time to build coding confidence.
These suggested lesson plans will give you an idea of how to partition your time. You are of course encouraged to make your own judgement and enjoy the content at your own specific pace.
Extracurricular section
Notice that we provided you with an extracurricular section.
In this section you will find additional useful lessons.
for example:
- If you are completely new to Python, you will find our Intro to Python (Turtles and Code) lesson helpful.
- If you have extra time and want to learn more about Machine Learning, you will find our Intro to Machine Learning.
Throughout the lessons, we will point you to additional extracurricular material when relevant.
Suggested Lesson Plan: Students Without Extensive Coding Experience
Module 1: Introduction to AI Programming with Python
At your leisure
Module 2: Intro to Python
-
Lessons (Why Python Programming, Data Types and Operators, Control Flow, Functions and Scripting)
-
1.5 weeks
-
Project_1 (using an Image classifier)
-
1.5 week
-
Module 3: Numpy, Pandas, Matplotlib
-
Anaconda, Jupyter Notebooks
- 1 week
-
Numpy, Pandas, Matplotib
- 1.5 weeks
Module 4: Linear Algebra Essentials
-
Lessons (Introduction, Vectors, Linear Combination, Linear Transformation and Matrices and Linear Algebra in Neural Networks )
- 0.5 week
-
Labs (Vectors, Linear Combination and Linear Mapping)
- 0.5 week
Module 5: Neural Networks
-
Lessons (Introduction to Neural Networks, Implementing Gradient Descent and Training Neural Networks)
- 1 week
-
Lesson (Deep Learning with PyTorch)
- 1 week
Module 6: Image Classifier Project
- 2.5 weeks
Notice that in total this sums up to 11.5 weeks. Use the extra time as you please.
Suggested Lesson Plan: Students With Extensive Coding Experience
Module 1: Introduction to AI Programming with Python
At your leisure
Module 2: Intro to Python
-
Lessons (Why Python Programming, Data Types and Operators, Control Flow, Functions and Scripting)
-
1 weeks
-
Project_1 (using an Image classifier)
-
1 week
-
Module 3: Numpy, Pandas, Matplotlib
-
Anaconda, Jupyter Notebooks
- 1 week
-
Numpy, Pandas, Matplotlib
- 1 week
Module 4: Linear Algebra Essentials
-
Lessons (Introduction, Vectors, Linear Combination, Linear Transformation and Matrices and Linear Algebra in Neural Networks )
- 0.5 week
-
Labs (Vectors, Linear Combination and Linear Mapping)
- 0.5 week
Module 5: Neural Networks
-
Lessons (Introduction to Neural Networks, Implementing Gradient Descent and Training Neural Networks)
- 1 week
-
Lesson (Deep Learning with PyTorch)
- 0.5 week
Module 6: Image Classifier Project
- 1.5 weeks
(Notice that you have 3.5 weeks of extra time if you choose to use it).