1/75
Looks like no tags are added yet.
machine learning
study of algorithms and statistical models that computer systems use to perform a task without explicit instructions (finding patterns in data)
supervised machine learning
expert gives feedback on algorithms decisions
unsupervised learning
no feedback, algorithm has to cluster data
reinforcement algorithms
no feedback, uses metric to tell if algorithm is performing well
classification
sorting instance into a class
regression
given instance, find value of instance
ranking
given instance, place it in ordered list
label
what is being predicted
feature
input variables
example
particular instance of data
labeled example
has feature and label
unlabeled example
has feature, no label
model
defines relationship between features and labels
training
creating/learning model
inference
applying trained model to unlabeled examples
training data
data algorithm is trained on
testing data
data algorithm is tested with
accuracy
(TP + TN) / (TP + TN + FP + FN)
precision
TP / (TP + FP)
recall
TP / (TP + FN)
specificity
TN / (TN / FP)
skewed distribution
dataset having more of one type of data than another
generalization
model making accurate predictions on new data
overfitting
model does very well on training set but poorly on test set; model learns training set well but cannot generalize
what makes a good test set?
large enough to give meaningful results; representative of data set as whole
validation set
comes before test set to ensure test set includes entirely new data
decision tree
sequences of decisions leading to set outcomes
attribute-based representations
examples described using attribute values (boolean, discrete, continuous); either positive (T) or negative (F)
how do you chose an attribute?
splits examples into subsets that are ideally all positive or all negative
what is the formula for linear machine learning?
y’ = b + w1x1
what does y’ represent in the linear machine learning formula?
the predicted label (output)
what does b represent in the linear machine learning formula?
bias
what does w1 represent in the linear machine learning formula?
weight of feature 1
what does x1 represent in the linear machine learning formula?
feature 1
empirical risk minimization
combines training and supervised learning to create model that minimizes loss
loss
penalty for bad predictions
what do x and y represent in the mean squared loss formula?
x is features, y is labels
what does prediction(x) represent in the mean squared loss formula?
function of weights and bias in combination with set of features x
what does D represent in the mean squared loss formula?
data set representing labeled data
what does n represent in the mean squared loss formula?
number of examples in D
support vector machines
used for classification, given n points in k-dimensional space, find hyperplane that separates two classes
gradient descent
adjusts parameters step by step
neural net
set of nodes organized in layers with a set of weights representing the connections between each layer, and an activation function that transforms the output of each node
random forest
set of decision trees each learning a model of data and voting on final classification
ANN
artificial neural network
backpropagation
gradient descent algorithm for neural networks, adjusts weights and biases
pooling layer
reduce number of nodes/data’s dimensionality making processing more manageable
what is the main problem with deep learning
the patterns it finds may not be the ones you want to find
deep learning
network with many hidden layers
clustering
form of unsupervised learning where patterns are found in unlabeled data
similarity
smallest (squared) euclidean distance
hierarchical algorithm
points in cluster, merge clusters that are close, repeat until a good set of clusters is obtained
non-hierarchical algorithms
decide amount of clusters, start with set of cluster choices, put each point in cluster it is closest to, adjust clusters, reassign points based on new cluster, repeat
k-means clustering
choose k number of clusters, assign point to nearest center, move center to mean of assigned points, stops when clusters do not change
tokens
how LLM processes words
tokenization rules
4 tokens is about 3 english words
vocab size
modern LLMs use about 50k to 100k unique token pieces
temperature
changes how LLM chooses tokens; low temperatures are more greedy/focused, high temperatures are more creative/unstable
why is attention important for LLMs?
meaning depends on long-distance word pairings across a paragraph; if related words are far apart a model can fail
what are the 3 stages for LLMs?
self-supervised pre-training
instruction fine tuning
reinforcement learning from human feedback
self-supervised pre-training
model trained on trillions of unlabeled web tokens; high world ‘knowledge’ but poor conversational compliance. 99% of compute resources used here
instruction fine-tuning
curated dataset of prompt-and-response pairs made by human experts to teach model structure of questions, answers, and coding tasks. can now understand conversation role-playing and direct user prompts
reinforcement learning from human feedback
human evaluators rank model outputs; steers model towards helpfulness and safety and avoids toxic and evasive answers
softmax
mathematical function LLM use to turn output score into valid probability distribution
survivorship bias
data biased towards entities that are present, the ones that fail should also concern us
conditional probability
probability outcome occurs when particular event occurs (outcome | event)
group fairness
probability outcome is the same across groups
(outcome = 1 | group = a) = (outcome = 1 | group = b)
conditional fairness
same probability of outcome across groups given same background information
(outcome = 1 | group = a and info = x) = (outcome = 1 | group = b and info = x)
statistical parity
states that you are unlikely to know outcome if you only know the group, and unlikely to know group if you only know the outcome
steps to data science life cycle
acquisition
management
preparation
analysis
model development
visualization
acquisition
getting data for project (what types of questions should be asked during collection?, what data do you need?)
management
how you will control data after management (what data will be stored, how is data stored)
preparation
putting data into format useful for algorithms, removing bad data
analysis
looking for meaning in data (what messages are in data, what techniques would be effective to find messages?)
model development
create model of data that lets us apply info found in data to project
visualization
taking information from model and putting it into form that makes knowledge gained easily understood