Demos from class and more!


Demo 1: Intro

An Introduction to Numerical Methods

Demo 2: Python

Python introduction.

Python tutorial

Additional resources for the python tutorial offered by TAs (Sept 3 and 4)

In-class activity 1: Python

Using python to create music

Demo 3: Floating Point

Floating point storage, arithmetic, rounding and more!

Demo 4: Big-O notation and convergence plots

Obtaining cost and complexity from plots

In-class activity 2: Floating Point

Using smaller storage systems and more

Demo 5: Taylor Series

Approximating functions using Taylor Series

Demo 6: Monte Carlo

Performing numerical experiments using Monte Carlo methods.

In-class activity 3: Monte Carlo

Using Monte Carlo methods to predict stock prices

Demo 7: Vectors and Matrices

Linear transformations, norms and sparse matrices.

Demo 8: Linear Systems

Linear system of equations and matrix conditioning

In-class activity 4: Linear system of equations

Solving ODEs and PDEs using interpolation methods

Demo 9: Eigenvalues

Power iteration algorithms

In-class activity 5: Markov chains

A nice application of eigenvalue problems!

Demo 10: Nonlinear Equations

Basic algorithms to solve nonlinear system of equations

In-class activity 6: Nonlinear problems

Using different methods to find roots

Demo 11: Optimization

Solving 1d and Nd optimization problems

In-class activity 7: Optimization

Solving optimization with steepest descent methods

Demo 12: Singular Value Decomposition

Brief introduction to SVD

Demo 13: Linear Least Squares

Data fitting with least squares

Demo 14: PCA

Brief intro to principal components analysis

In-class activity 8: Linear Least Squares

Using least squares to choose your starting Fantasy team

In-class activity 9: Principal Component Analysis

Using PCA in soccer data

In-class activity 10: Intro to Machine Learning

Using sklearn to solve simple classification problems

General tips to run the demos

You can have access to the demos in different ways:

We encourage you to install Python and the Numpy+Scipy+Matplotlib stack on your personal computer. For example, you may want to install Anaconda, which is a (free) Python distribution that includes Numpy+Scipy+Matplotlib and other useful libraries.

Using python at CBTF

1) Launching jupyter notebook in CBTF:

Enter jupyter notebook in the terminal and a browser will start with the jupyter notebook environment.

2) Since you don’t have access to any Python online documentation at CBTF, you can use the help method, which call the built-in Python help system:


For example, if you want to get more information about numpy.array, you can try this:

import numpy