CSE 432 Midterm

0.0(0)
studied byStudied by 1 person
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/101

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

102 Terms

1
New cards

machine learning is the study of _________ that improve their __________ at some ________ with ___________

algorithms; performance; task; experience

2
New cards

well-defined learning task: < ____ >

P, T, E

3
New cards

machine learning is good at recognizing ________, recognizing _________, and _________

patterns; anomalies; prediction

4
New cards

deep learning is a type of __________ ________ _________

artificial neural network

5
New cards

more than 2 hidden layers makes it a _____ _______ _________ (____)

deep neural network (DNN)

6
New cards

the most popular machine learning algorithm

deep learning

7
New cards

the ______ in Python is important because it indicates a block of code

indentation

8
New cards

comments in python use ___; block comments use three ___ or ___

#; ‘; “

9
New cards

variables in python are _____ _________ and must start with a ______ or the ________ character, no _________

case sensitive; letter; underscore; numbers

10
New cards

boolean in Python is declared as _______

bool

11
New cards

Python for loop syntax through myList

for x in myList:

12
New cards

Python for loop syntax for range of 10

for x in range(10):

13
New cards

used in Python to store data values in key:value pairs; they are _______ and do not allow ________

dictionaries; ordered; duplicates

14
New cards

Python function definition

def myFunction(input):

15
New cards

what do you add to you parameter for an arbitrary number of arguments?

*

16
New cards

declare arr [1 2 3 4] as an numpy array

arr = np.array([1, 2, 3, 4])

17
New cards

declare 2×2 matrix (mat) as numpy array

mat = np.array([1,1],[2,2])

18
New cards

check the dimension of numpy array (arr) TWO WAYS

arr.ndim; arr.shape

19
New cards

comprehensive library for creating static, animated, and interactive visualizations in Python

matplotlib

20
New cards

a vector is a ____ _____

1D array

21
New cards

matrix transpose is an operator that _____ the matrix over its _______, in turn switching the _____ and ______

flips; diagonal; rows; columns

22
New cards

v = [a,b]
f(v) = a² + b²
what is f’(v) with respect to v?

f’(v) = [2a, 2b]

23
New cards

for derivatives with a matrix or vector, we normally multiply the ________ and the ____ ________

transpose; one vector

24
New cards

python code to find magnitude of vector x

y = x**2
s = np.sum(y)
d = np.sqrt(s)

25
New cards

python add/subtract vectors x and y

x + y; x - y

26
New cards

numpy dot product for x and y

np.dot(x,y)

27
New cards

matplotlib plot function for x, y

plt.plot(x, y, label='My Plot’, linewidth=2.0)

28
New cards

KNN is ___ __________ _________

non parameter learning

29
New cards

non-parameter learning y = _____
parameter learning y = ____

f(X, X_train); f(X,W)

30
New cards

non-parameter learning needs the _____ ________ ________ and is very slow in ______ with almost no ______ ________

entire training dataset; inferring; training process

31
New cards

similar to using a dictionary to find definitions or synonyms

non-parameter learning

32
New cards

parameter learning requires the ____, is very _____ in _______, but takes more ______ in _______

weight; fast; inferring; time; training

33
New cards

similar to having the word in your brain to recognize it at once

parameter learning

34
New cards

gives you the ground truth

loss function

35
New cards

common loss function

Loss(y, y^) = sum(y-y^)²

36
New cards

with different combinations of theta0 and theta1, we obtain different ______ ______, it is a ____ surface

loss values; 3D

37
New cards

loss value shows how close your _________ __________ ___________ is to the ________ ________

machine learning algorithm; ground truth

38
New cards

for a loss value, the _______ the ________

lower; better

39
New cards

machine learning aims to find the best ________ that ____ ________ could obtain the _______ value

parameters; loss function; lowest

40
New cards

how do we get the smallest loss value

gradient descent

41
New cards

each step of gradient descent uses all of the training examples - this is known as …

batch gradient descent

42
New cards

your step size in gradient descent is known as the _________ _____

learning rate

43
New cards

output is decrete in _________

classification

44
New cards

output is continuous in _________

regression

45
New cards

machine learning is a ____-______ approach

data driven

46
New cards

data: any __________ fact, value, text, sound, or picture not being _______ and __________

unprocessed; interpreted; analyzed

47
New cards

a set of data collected for machine learning based task

dataset

48
New cards

a set of data used to discover predictive relationships

training dataset

49
New cards

a set of data used to asses the strength and utility of a predictive relationship

test dataset

50
New cards

the attributes to each data sample

features

51
New cards

KNN stands for:

k nearest neighbors

52
New cards

for KNN:

  1. calculate the ____ _________ for every _____ _______

  2. select the ____ data points with the _________ _________

  3. ________ based on the k point (new data point should belong to same category as the _______ )

L-2 distance; data point; K; smallest distance; voting; majority

53
New cards

can you still use KNN if there is more than one feature for distance calculations?

yes

54
New cards

when setting up KNN, you can choose two parameters:

  1. the best ______ of ___ for ________

  2. the best _______ for ________

value; k; voting; distance; measuring

55
New cards

the parameters you set of KNN are known as _____________ and are not ________ by the machine learning _______ itself

hyperparameters; adapted; algorithm

56
New cards

a set of examples used to tune the hyperparameters

validation dataset

57
New cards

never use _____ data to _____ _______

test; train model

58
New cards

cross validation: when dataset is ______, ______ data, try each fold as _______ and _______

small; split; validation; average

59
New cards

cross validation is _________ in deep learning

uncommon

60
New cards

learning from labeled examples

supervised learning

61
New cards

draw from inferences from datasets consisting of input data without labeled responses

unsupervised learning

62
New cards

supervised learning has pairs with an ______ object and a desired ______ value

input; ouput

63
New cards

unsupervised learning finds ______ ________ or _________ in data

hidden patterns; grouping

64
New cards

K-Means Algorithm:

  1. initialize ____ _______ _______

  2. assign _____ ______ to ________ clusters

  3. update _______ _________ by calculating _________

  4. repeat ___ and ___ until _________

  5. select optimal number of ________

K center centroids; data points; nearest; center centroids; average; 2; 3; convergence; clusters

65
New cards

non-parameter learning requires computation of all of the _______ ________, taking more ______ and ________

training dataset; time; memory

66
New cards

non-parameter/parameter, supervised/unsupervised
KNN:
K-Means:
Linear Regression:

non-parameter, supervised; non-parameter, unsupervised; parameter, supervised

67
New cards

KNN and K-Means are __________ tasks whereas linear regression is a _________ task

classification; regression

68
New cards

linear regression steps

propose model; gradient descent; get parameters and test

69
New cards

image recognition is _______; stock price prediction is ________

classification; regression

70
New cards

softmax classifier: build upon ________ _________; _____ score of class k to __________ of being in this class; __________ of being in different classes sum up to ____

linear classification; map; probability; probabilities; 1

71
New cards

loss over the dataset is the _________ ______ for all _________

average loss; examples

72
New cards

three loss functions

MAE; MSE; Cross Entropy

73
New cards

MAE: ______ ________ __________
Equation:

mean absolution error; abs(y^ - y)

74
New cards

MSE: ______ _________ _________
Equation:

mean square error; (y^ - y)²

75
New cards

Cross Entropy is the _________ _____ likelihood of the __________ ________ as the loss

negative log; correct class

76
New cards

cross entropy for the following:
true label: [1 0 0 0 0]
softmax: [0.1 0.5 0.1 0.1 0.2]

-(1*log(0.1))+(0*log(0.5))+(0*log(0.1))+(0*log(0.1))+(0*log(0.2))

77
New cards

Regularization:
- it is likely different ___ has the same _____
- regularization helps to _______ ________ and avoid _________

W; loss; express preference; overfitting

78
New cards

L(W) including regularization

L(W) = data loss + regularization

79
New cards

overfitting: model tries to fit not only the __________ relation between _____ and ______ but also the _______ ________; ________ ______________ helps select simple models

regular; inputs; outputs; sampling errors; weight regularization

80
New cards

numerical gradient: __________, ______, easy to _____
analytic gradient: ______, _______, _______ prone
—> in practice we use _______ but check with _________

approximate; slow; write; exact; fast; error; analytic; numerical

81
New cards

with backpropogation, given f(x, y, z), you’ll end up getting which derivatives

df/dx; df/dy; df/dz

82
New cards

in backpropogation, multiply the _________ by the ______ ___________

upstream; local gradient

83
New cards

tool used for forward and back propogation

computational graph

84
New cards

the local gradient is the _________

derivative

85
New cards

the input to the local gradient is found from __________-____________

forward-propogation

86
New cards

current gradient =

local gradient * upstream gradient

87
New cards

what do we assume to begin back propogation if forward not clear

2

88
New cards

the input layer for a neural network

the first layer

89
New cards

the output layer for a neural network

the last layerl

90
New cards

layers in between input and output layers of neural networks

hidden layers

91
New cards

neurons between ________ layers are typically connected, neurons _______ the ______ layer are not connected

adjacent; within; same

92
New cards

the input layer of a neural network is _________ meaning the ________ is the input

transparent; output

93
New cards

two parts in the neurons of hidden layer

accumulation of product; activation function

94
New cards

connection among neurons has a _______ and it is the parameter that should be ________

weight; learned

95
New cards

which layer has a “special” activation function

output

96
New cards

squashes numbers [0, 1] and is popular, used in RNN

sigmoid

97
New cards

squashes numbers [-1,1] and zero-centered, used in RNN

tanh

98
New cards

squashes number [0, infinity] and does not saturate, used in CNN and FCN

RELU

99
New cards

squashes numbers [-infinity, infinity], does not saturate

leaky RELU

100
New cards

for choosing activation functions, typically choose _____, then _____ _______ if that doesn’t work; sometimes _____, not normally _______

RELU; leaky RELU; tanh; sigmoid