Matrix Math Flashcards

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
Q

Basic parts of a neural network

A

Input data, processing, output

26
Q

Individual nodes are called

A

perceptrons

27
Q

What are weights?

A

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
Q

W vs w

A

W when it represents a matrix of weights or a w when it represents an individual weight

29
Q

How is an output signal determined?

A

feeding the linear combination into an activation function

30
Q

What are two ways to go from an AND perceptron to an OR perceptron?

A

Increase the weights

Decrease the magnitude of the bias

31
Q

AND perceptron

A

Both must be true to accept

32
Q

OR perceptron

A

One must be true

33
Q

NOT perceptron

A

A specific one must be true

34
Q

XOR perceptron

A

outputs 0 if the inputs are the same and 1 if the inputs are different

35
Q

Gradient is

A

term for rate of change or slope

36
Q

To calculate rate of change

A

derivative of a function f(x) gives you another function f​’(x) that returns the slope of f(x) at point x

37
Q

Local minima

A

where the error is low, but not the lowest

38
Q

SSE is

A

measure of networks performance. Low means good predictions.

39
Q

np.dot is the same as

A

Multiplying two matrices and then getting the sum

40
Q

sigmoid(x)

A

1/(1+np.exp(-x))

41
Q

sigmoid_prime(x)

A

sigmoid(x) * (1 - sigmoid(x))