CSE 432 Midterm

studied byStudied by 1 Person
0.0(0)
Get a hint
hint

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

1/102

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

Studying Progress

New cards
102
Still learning
0
Almost done
0
Mastered
0
102 Terms
New cards

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

algorithms; performance; task; experience

New cards
New cards

well-defined learning task: < ____ >

P, T, E

New cards
New cards

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

patterns; anomalies; prediction

New cards
New cards

deep learning is a type of __________ ________ _________

artificial neural network

New cards
New cards

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

deep neural network (DNN)

New cards
New cards

the most popular machine learning algorithm

deep learning

New cards
New cards

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

indentation

New cards
New cards

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

#; ‘; “

New cards
New cards

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

case sensitive; letter; underscore; numbers

New cards
New cards

boolean in Python is declared as _______

bool

New cards
New cards

Python for loop syntax through myList

for x in myList:

New cards
New cards

Python for loop syntax for range of 10

for x in range(10):

New cards
New cards

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

dictionaries; ordered; duplicates

New cards
New cards

Python function definition

def myFunction(input):

New cards
New cards

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

*

New cards
New cards

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

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

New cards
New cards

declare 2×2 matrix (mat) as numpy array

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

New cards
New cards

check the dimension of numpy array (arr) TWO WAYS

arr.ndim; arr.shape

New cards
New cards

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

matplotlib

New cards
New cards

a vector is a ____ _____

1D array

New cards
New cards

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

flips; diagonal; rows; columns

New cards
New cards

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

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

New cards
New cards

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

transpose; one vector

New cards
New cards

python code to find magnitude of vector x

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

New cards
New cards

python add/subtract vectors x and y

x + y; x - y

New cards
New cards

numpy dot product for x and y

np.dot(x,y)

New cards
New cards

matplotlib plot function for x, y

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

New cards
New cards

KNN is ___ __________ _________

non parameter learning

New cards
New cards

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

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

New cards
New cards

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

entire training dataset; inferring; training process

New cards
New cards

similar to using a dictionary to find definitions or synonyms

non-parameter learning

New cards
New cards

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

weight; fast; inferring; time; training

New cards
New cards

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

parameter learning

New cards
New cards

gives you the ground truth

loss function

New cards
New cards

common loss function

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

New cards
New cards

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

loss values; 3D

New cards
New cards

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

machine learning algorithm; ground truth

New cards
New cards

for a loss value, the _______ the ________

lower; better

New cards
New cards

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

parameters; loss function; lowest

New cards
New cards

how do we get the smallest loss value

gradient descent

New cards
New cards

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

batch gradient descent

New cards
New cards

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

learning rate

New cards
New cards

output is decrete in _________

classification

New cards
New cards

output is continuous in _________

regression

New cards
New cards

machine learning is a ____-______ approach

data driven

New cards
New cards

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

unprocessed; interpreted; analyzed

New cards
New cards

a set of data collected for machine learning based task

dataset

New cards
New cards

a set of data used to discover predictive relationships

training dataset

New cards
New cards

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

test dataset

New cards
New cards

the attributes to each data sample

features

New cards
New cards

KNN stands for:

k nearest neighbors

New cards
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

New cards
New cards

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

yes

New cards
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

New cards
New cards

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

hyperparameters; adapted; algorithm

New cards
New cards

a set of examples used to tune the hyperparameters

validation dataset

New cards
New cards

never use _____ data to _____ _______

test; train model

New cards
New cards

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

small; split; validation; average

New cards
New cards

cross validation is _________ in deep learning

uncommon

New cards
New cards

learning from labeled examples

supervised learning

New cards
New cards

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

unsupervised learning

New cards
New cards

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

input; ouput

New cards
New cards

unsupervised learning finds ______ ________ or _________ in data

hidden patterns; grouping

New cards
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

New cards
New cards

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

training dataset; time; memory

New cards
New cards

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

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

New cards
New cards

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

classification; regression

New cards
New cards

linear regression steps

propose model; gradient descent; get parameters and test

New cards
New cards

image recognition is _______; stock price prediction is ________

classification; regression

New cards
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

New cards
New cards

loss over the dataset is the _________ ______ for all _________

average loss; examples

New cards
New cards

three loss functions

MAE; MSE; Cross Entropy

New cards
New cards

MAE: ______ ________ __________
Equation:

mean absolution error; abs(y^ - y)

New cards
New cards

MSE: ______ _________ _________
Equation:

mean square error; (y^ - y)²

New cards
New cards

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

negative log; correct class

New cards
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))

New cards
New cards

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

W; loss; express preference; overfitting

New cards
New cards

L(W) including regularization

L(W) = data loss + regularization

New cards
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

New cards
New cards

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

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

New cards
New cards

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

df/dx; df/dy; df/dz

New cards
New cards

in backpropogation, multiply the _________ by the ______ ___________

upstream; local gradient

New cards
New cards

tool used for forward and back propogation

computational graph

New cards
New cards

the local gradient is the _________

derivative

New cards