Flashcards in Matrix Math Deck (41):
A single value is known as
a value with 0 dimensions
Lists of values are known as
Types of vectors
row and column
Dimensions of vectors
just one: length
What is a matrix
a 2 dimensional grid of values
What is a tensor?
Any n-dimensional collection of values
Locations in matrices are known as
Like a 1 layer nested array
a C library in python.
Does lots of math operations in Python and is designed to work with matrices.
Normal convention for naming numpy
import numpy as np
Most common way to with number in NumPy is through
ndarray objects are
similar to Python lists, but can have any number of dimensions
Does fast math operations
To declare an ndarray
x = nd.array(5)
To get shape of ndarray
To reshape an nd array like one that is (4,)
Why do some people use
x = v[:, None]
Adds extra dimension
Like iterating through and running an operation
Requirements for adding two matrices
Have to be the same shape
When describing the shape of a matrix how does one describe it?
rows x columns
You can only safely run a transpose to multiply if
The data is arranged as rows
To get the min, max, mean of a matrix
How to calculate error in a logistic regression?
It the number of errors
What method does one use to minimize the error?
Basic parts of a neural network
Input data, processing, output
Individual nodes are called
What are weights?
A higher weight means the neural network considers that input more important than other inputs, and lower weight means that the data is considered less important.
W vs w
W when it represents a matrix of weights or a w when it represents an individual weight
How is an output signal determined?
feeding the linear combination into an activation function
What are two ways to go from an AND perceptron to an OR perceptron?
Increase the weights
Decrease the magnitude of the bias
Both must be true to accept
One must be true
A specific one must be true
outputs 0 if the inputs are the same and 1 if the inputs are different
term for rate of change or slope
To calculate rate of change
derivative of a function f(x) gives you another function f'(x) that returns the slope of f(x) at point x
where the error is low, but not the lowest
measure of networks performance. Low means good predictions.
np.dot is the same as
Multiplying two matrices and then getting the sum