AI-LEARNING Flashcards
provides a computer with data, rather than explicit instructions. Using these data, the computer learns to recognize patterns and becomes able to execute tasks on its own.
Machine Learning
given a data set of input-output pairs, learn a function to map inputs to outputs
Supervised Learning
a task where the function maps an input to a discrete output.
Classification
algorithm that, given an input, chooses the class of the nearest data point to that input
Nearest-Neighbor Classification
algorithm that, given an input, chooses the most common class out of the k nearest data points to that input
K-Nearest-Neighbor Classification
Drawback of the k-nearest-neighbors algorithm
Using a naive approach, the algorithm will have to measure the distance of every single point to the point in question, which is computationally expensive.
Solution to the drawback of k-nearest-neighbors algorithm
Use data structures that enable finding neighbors more quickly or by pruning irrelevant observations.
for each data point, we adjust the weights to make our function more accurate.
Perceptron Learning Rule
sequences of numbers
Vector
The weights and values in Perceptron Learning are represented using?
Vectors
Drawback of Perceptron Learning
data are messy, and it is rare that one can draw a line and neatly divide the classes into two observations without any mistakes
unable to express uncertainty, since it can only be equal to 0 or to 1.
Hard Threshold
uses a logistic function which is able to yield a real number between 0 and 1, expressing confidence in the estimate
Soft Threshold
they are designed to find the maximum margin separator
Support Vector Machines
A boundary that maximizes the distance between any of the data points
Maximum Margin Separator
Benefit of Support Vector Machines
they can represent decision boundaries with more than two dimensions, as well as non-linear decision boundaries
supervised learning task of learning a function mapping an input point to a continuous value
Regression
this function gains value when the prediction isn’t correct and doesn’t gain value when it is correct
0-1 Loss Function
functions that can be used when predicting a continuous value
L1 and L2 loss functions
L1 Loss Function Formula
|actual - predicted|
L2 Loss Function Formula
(actual - predicted)^2
L1 vs L2
L₂ penalizes outliers more harshly than L₁ because it squares the the difference
when a model fits the training data so well that it fails to generalize to other data sets.
Overfitting
process of penalizing hypotheses that are more complex to favor simpler, more general hypotheses.
Regularization
This is used to avoid overfitting
Regularization
a constant that we can use to modulate how strongly to penalize for complexity in our cost function
Lambda (λ)
A technique for testing whether a model is overfitted by splitting data in two (testing and training set)
Holdout Cross-Validation
downside of holdout cross validation
we don’t get to train the model on half the data, since it is used for evaluation purposes.
we divide the data into k sets. We run the training k times, each time leaving out one dataset and using it as a test set. We end up with k different evaluations of our model, which we can average and get an estimate of how our model generalizes without losing any data.
k-Fold Cross Validation
given a set of rewards or punishments, learn what actions to take in the future
Reinforcement Learning
model for decision-making, representing states, actions, and their rewards
Markov Decision Processes
Reinforcement Learning as a Markov Decision Process
- Set of states S
- Set of actions Actions(S)
- Transition model P(s’ | s, a)
- Reward function R(s, a, s’)
method for learning a function Q(s,a), outputs an estimate of the value of performing action a in state s
Q-Learning
Q-Learning Process
- The model starts with all estimated values equal to 0 (Q(s,a) = 0 for all s, a).
- When an action is taken and a reward is received, the function does two things:
- It estimates the value of Q(s, a) based on current reward and expected future rewards, and
- Updates Q(s, a) to take into account both the old estimate and the new estimate. This gives us an algorithm that is capable of improving upon its past knowledge without starting from scratch.
an algorithm that completely discounts the future estimated rewards, instead always choosing the action a in current state s that has the highest Q(s, a).
Greedy Decision-Making
Explore vs. Exploit tradeoff
A greedy algorithm always exploits, taking the actions that are already established to bring to good outcomes. However, it will always follow the same path to the solution, never finding a better path. Exploration, on the other hand, means that the algorithm may use a previously unexplored route on its way to the target, allowing it to discover more efficient solutions along the way.
In this type of algorithm, we set ε equal to how often we want to move randomly. With probability 1-ε, the algorithm chooses the best move (exploitation). With probability ε, the algorithm chooses a random move (exploration).
ε (epsilon) greedy algorithm
Technique used in q-learning when game has multiple states and actions, making it computationally demanding.
function approximation
given input data without any additional feedback/information, learn patterns.
Unsupervised Learning
organizing a set of objects into groups in such a way that similar objects tend to be in the same group
clustering
Applications of Clustering
- Genetic Research
- Image Segmentation
- Market Research
- Medical Imaging
- Social Network Analysis
algorithm for clustering data based on repeatedly assigning points to clusters and updating those clusters’ center
k-means Clustering