

Calculus

Data Science- Calculus
-
Introduction to Calculus -
What do we need to know for backpropagation - Any new insights in visually understanding calculus

Intoduction

Chapter 1 | Intro

Indentation
- Python Indentations (Exc 2)
Where in other programming languages the indentation in code is for readability only, in Python the indentation is very important.
Python uses indentation to indicate a block of code.

Chapter 1 | Python, class intro

Indentation
- Python Indentations (Exc 2)
Where in other programming languages the indentation in code is for readability only, in Python the indentation is very important.
Python uses indentation to indicate a block of code.

Chapter 1 | Python, class intro

Intro to Functions

Chapter 1 | Intro to Functions

Derivative Visual

Chapter 3 | Derivative Visual

Derivative equation

Chapter 3 | Derivative


Derivative equation

Chapter 3 | Derivative

Derivative equation

Chapter 3 | Derivative
Parameters
----------
f : function
Vectorized function of one variable
a : number
Compute derivative at x = a
method : string
Difference formula: 'forward'
h : number
Step size in difference formula
Returns
-------
float
Difference formula:
forward: f(a+h) - f(a))/h
'''
Integration

Chapter 4 | What is Integration
Greek astronomer Eudoxus (370 BC). He wanted to find a volume or area of a large object


Integration

Chapter 4 | What is Integration
That by breaking up the object into a small measurable piece, you could then add all those atomic pieces together to find the area.
The smaller this piece was, the more accurate this calculation was. It was not until the 17th century that we were able to refine this process into calculus.

Integration-Circle

Chapter 4 | Integration

Integration-Circle

Chapter 4 | Integration
The numerical integration of a circle is based on the circumference formula, why is that?

Integration

Chapter 4 | Numerical Integration

Integration

Chapter 4 | Numerical Integration
#f stands for function argument
#a stands for starting point
#b stands for ending point
#dx means the tiny piece
def integrate(f, a, b, dx=1):
i = a
s = 0
while i <= b:
s += f(i)*dx
i += dx
return sHow does this give us numerical integ?

Chain Rule

Chapter 5 | Chain Rule
What does the chain rule do?

Chain Rule

Chapter 5 | Chain Rule
What does the chain rule do?

Chain Rule

Chapter 5 | Chain Rule
- The chain rule states that the derivative of f(g(x)) is f'(g(x))⋅g'(x).
- In other words, it helps us differentiate *composite functions*.
- sin(x²) is a composite function because it can be constructed as f(g(x)) for f(x)=sin(x) and g(x)=x². Using the chain rule and the derivatives of sin(x) and x², we can then find the derivative of sin(x²).

Chain Rule

Chapter 5 | Chain Rule
import numpy as np
x = 1.5
line =x
xSquared =x**2
sin = np.sin(x)
dline_dx = 1
d_xSquared = 2*x
d_sin = np.cos(xSquared)
dSquared_dx = d_xSquared * dline_dx
dsin_dx = d_sin * d_xSquared

Chain Rule Project

Chapter 5 | Chain Rule
Create a Class
To create a class, use the keyword class:

Example
Create a class named Snake, with a property named name

Chapter 1 | Python, class intro

The __init__() Function
Use the __init__() function to assign values to object properties, or other operations that are necessary to do when the object is being created.
Chapter 2 | More on classes

The __init__() Function
In the class named Snake, use the __init__() function to assign values for new_color

Example
Chapter 2 | More on classes


Data architecture
Chapter 3 | What’s a Neural Network?

Chapter 3 | What’s a Neural Network?


Chapter 3 | What’s a Neural Network?
What does this look like in code format using Numpy?


Chapter 3 | What’s a Neural Network?
Chapter 3 | What’s a Neural Network?


Chapter 3 | What’s a Neural Network?



Forward propagation Intro
Chapter 5 | Forward propagation Intro
Chapter | Forward propagation Intro


Multiplication
of layers and weight matrices
Chapter | Forward propagation Intro

Multiplication
of layers and weight matrices
Chapter | Forward propagation Intro


Chapter | Forward propagation Intro

Chapter | Forward propagation Intro


Chapter | Forward propagation Intro


Multiplication
of layers and weight matrices
Chapter | Forward propagation Intro

Multiplication of layers and weight matrices

Chapter | Forward propagation Intro


Multiplication of layers and weight matrices
Chapter | Forward propagation Intro


What they represent mathematically
Chapter | Forward propagation Intro


What is Z representing
Chapter | Forward propagation Intro


What we learned

Chapter | Sigmoid Function
Sigmoid Function
Chapter | Sigmoid Function


We need to convert our values into a probable value
Chapter | Sigmoid Function


Chapter | Forward Propagation Continued


Chapter | Forward Propagation Continued


Bootcamp- Concepts

www.diggitacademy.co.uk
Chapter | Error Calcuation


Chapter | Error Calcuation




Chapter | Error Calcuation


Chapter | Error Calcuation


Chapter | Error Calcuation
Chapter | Error Calcuation



https://www.surveymonkey.com/r/QY2W2C9
Please give us feedback :)
There are only 5 questions in the Survey
Calculus Backpropagation
By Marina Goto
Calculus Backpropagation
- 146