Hacking Math I

Spring 2020

drawing

Topic 1: Introduction

This topic:

  1. Syllabus discussion
  2. Installation of tools

Readings:

  • "Coding the Matrix" Chapters 0 and 1.
  • Tons of Jupyter and Python resources on internet.

Prerequisites

  • Programming skills necessary. We will be using Python. You can use R, Matlab, or Julia if you prefer

  • Vector geometry & calculus

  • Some exposure to Prob & Stat

  • Undergraduate Matrix Algebra

Prerequisites exist for a reason. Most people fail if they don't actually know the contents of them. If you are weak in an area you will need to devote extra time to keeping up. The university has plenty of resources for tutoring in the undergraduate subjects listed above.

You cannot cram and memorize your way through mathematics.

Grading

  • Quizzes/Homework/Labs/Participation - 10%
  • Midterm I - 20%
  • Midterm II - 30%
  • Final Exam - 40%

Exams are cumulative, but emphasize new material.

Everything covered in class and everything you are supposed to know from prereqs is fair game.

Texts

  • "Mathematics for Machine Learning", Deisenroth et al 2019, https://mml-book.com
  • “Introduction to Applied Linear Algebra”, Boyd & Vendenberghe, http://vmls-book.stanford.edu/
  • "The Data Science Design Manual", Skiena 2017 (optional)
  • "Coding the Matrix", Philim Klein, Newtonian Press 2013 (optional)
  • "Python for Probability, Statistics, and Machine Learning", Unpingco 2016 (optional)

Notes vs. Slides

Slides are a prop to help discussions and lectures, not a replacement for notes.

Math does not work well via slides. Derivations and problems will be often be given only on the board, requiring note-taking.

If you have a computer science background this is a skill you may need to re-learn.

Attendance

"The instructor has the right to dismiss from class any student who has been absent more than two weeks (pro-rated for terms different from that of the semester). A dismissed student will receive a withdrawal (W) from the course if they are still eligible for a withdrawal per the University “Withdrawal from a Course” policy, or a failure (F) if not." - Student Handbook

If you miss a class you are responsible for learning the material on your own.

Participation

Active-learning techniques will be used regularly in class, requiring students to work individually and/or with other students.

Refusal to participate (or consistent failure to pay attention) will be treated as absence from class and ultimately lead to dismissal from the class.

Topics

  1. Linear Algebra with Python
  2. Statistics via linear algebra
  3. Calculus for Optimization and Machine Learning
  4. Diagrammatics and Computational graphs

II. Tools Installation

Jupyter - "notebooks" for inline code + LaTex math + markup, etc.

A single document containing a series of "cells". Each containing code which can be run, or images and other documentation.

  • Run a cell via [shift] + [Enter] or "play" button in the menu.
drawing

Will execute code and display result below, or render markup etc.

Can also use R or Julia (easily), Matlab, SQL, etc. (with increasing difficulty).

In [2]:
import datetime

print("This code is run right now (" + str(datetime.datetime.now()) + ")")
This code is run right now (2020-01-27 16:01:16.022776)
In [4]:
x=1+2+2+9

print(x)
14

Installation

First project: get Jupyter running and be able to import listed tools

Easiest to install via Anaconda. Preferrably Python 3.

https://www.anaconda.com/download/

Highly recomended to make a separate environment for class - hot open source tools change fast and deprecate (i.e. break) old features constantly

conda install jupyter matplotlib numpy scipy scikit-learn pandas ...

Many other packages to taste...

Python Help Tips

  • Get help on a function or object via [shift] + [tab] after the opening parenthesis function(
drawing
  • Can also get help by executing function?
drawing