Matrix Math Flashcards

(41 cards)

1
Q

A single value is known as

A

scalar

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

scalar

A

a value with 0 dimensions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Lists of values are known as

A

vectors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Types of vectors

A

row and column

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Dimensions of vectors

A

just one: length

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a matrix

A

a 2 dimensional grid of values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a tensor?

A

Any n-dimensional collection of values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Locations in matrices are known as

A

indices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Indices nomenclature

A

Like a 1 layer nested array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Numpy is

A

a C library in python.

Does lots of math operations in Python and is designed to work with matrices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Normal convention for naming numpy

A

import numpy as np

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Most common way to with number in NumPy is through

A

ndarray objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

ndarray objects are

A

similar to Python lists, but can have any number of dimensions
Does fast math operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

To declare an ndarray

A

x = nd.array(5)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

To get shape of ndarray

A

nd.shape

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

To reshape an nd array like one that is (4,)

A

(4,).reshape(1,4)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Why do some people use

x = v[:, None]

A

Adds extra dimension

18
Q

Elementwise operations

A

Like iterating through and running an operation

19
Q

Requirements for adding two matrices

A

Have to be the same shape

20
Q

When describing the shape of a matrix how does one describe it?

A

rows x columns

21
Q

You can only safely run a transpose to multiply if

A

The data is arranged as rows

22
Q

To get the min, max, mean of a matrix

A

np. min(array)
np. max(array)
mp. mean(array)

23
Q

How to calculate error in a logistic regression?

A

It the number of errors

24
Q

What method does one use to minimize the error?

A

Gradient descent

25
Basic parts of a neural network
Input data, processing, output
26
Individual nodes are called
perceptrons
27
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.
28
W vs w
W when it represents a matrix of weights or a w when it represents an individual weight
29
How is an output signal determined?
feeding the linear combination into an activation function
30
What are two ways to go from an AND perceptron to an OR perceptron?
Increase the weights | Decrease the magnitude of the bias
31
AND perceptron
Both must be true to accept
32
OR perceptron
One must be true
33
NOT perceptron
A specific one must be true
34
XOR perceptron
outputs 0 if the inputs are the same and 1 if the inputs are different
35
Gradient is
term for rate of change or slope
36
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
37
Local minima
where the error is low, but not the lowest
38
SSE is
measure of networks performance. Low means good predictions.
39
np.dot is the same as
Multiplying two matrices and then getting the sum
40
sigmoid(x)
1/(1+np.exp(-x))
41
sigmoid_prime(x)
sigmoid(x) * (1 - sigmoid(x))