Machine Learning Part 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/178

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:09 AM on 3/31/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

179 Terms

1
New cards

Support Vector Machine (SVM)

A supervised learning model that finds a decision boundary maximizing the margin between classes

2
New cards

Margin

Distance between decision boundary and closest data points

3
New cards

Support vectors

Points closest to the decision boundary that determine the margin

4
New cards

Linear separability

Data can be separated by a linear boundary

5
New cards

Convex optimization

Optimization where any local minimum is global

6
New cards

Hard margin SVM

SVM with no tolerance for misclassification

7
New cards

Soft margin SVM

SVM allowing violations using slack variables

8
New cards

Slack variable (ξᵢ)

Measures margin violation for a data point

9
New cards

Regularization parameter (C)

Controls tradeoff between margin size and violations

10
New cards

Large C

Low tolerance for errors, smaller margin

11
New cards

Small C

Higher tolerance for errors, larger margin

12
New cards

Hard margin objective

min (1/2)||w||²

13
New cards

Hard margin constraint

yᵢ(wᵀxᵢ) ≥ 1

14
New cards

Soft margin objective

min (1/2)||w||² + (C/N)Σξᵢ

15
New cards

Soft margin constraint

yᵢ(wᵀxᵢ) ≥ 1 − ξᵢ and ξᵢ ≥ 0

16
New cards

Hinge loss

max(0, 1 − yᵢwᵀxᵢ), penalizes points inside margin or misclassified

17
New cards

SVM loss

(1/2)||w||² + (C/N)Σmax(0, 1 − yᵢwᵀxᵢ)

18
New cards

L2 regularization

Penalty discouraging large weights

19
New cards

Logistic loss

log(1 + e^{−y wᵀx})

20
New cards

Hinge vs logistic loss

Hinge is piecewise linear, logistic is smooth

21
New cards

Feature mapping (ϕ(x))

Transforms data to higher dimension

22
New cards

Kernel function

K(x,z) = ϕ(x)ᵀϕ(z), computes inner product in feature space without explicit mapping

23
New cards

Kernel trick

Uses kernel without explicit mapping

24
New cards

Gaussian kernel

exp(−||x−y||² / (2σ²))

25
New cards

Polynomial kernel

(xᵀy + c)^d

26
New cards

Dual form SVM

Optimization in terms of α variables

27
New cards

Dual solution

w = Σαᵢ yᵢ xᵢ (for linear SVM after solving dual problem)

28
New cards

Why kernels matter

Allow nonlinear boundaries efficiently

29
New cards

Parametric model

Model with fixed number of parameters independent of dataset size

30
New cards

Nonparametric model

Model whose complexity grows with dataset size

31
New cards

Examples of parametric models

Linear regression, logistic regression, SVM

32
New cards

Examples of nonparametric models

KNN, decision trees

33
New cards

K-Nearest Neighbors (KNN)

Model that predicts using nearby data points

34
New cards

KNN training

Stores all training data

35
New cards

KNN prediction

Uses majority vote (classification) or average (regression)

36
New cards

KNN classification formula

ŷ(x) = sign(Σ{i ∈ Nk(x)} yᵢ)

37
New cards

KNN regression formula

f(x) = (1/k)Σyᵢ

38
New cards

KNN hyperparameter

K (number of neighbors)

39
New cards

Small K

Flexible, high variance, overfitting

40
New cards

Large K

Smooth, high bias, underfitting

41
New cards

Distance metric

Measure of similarity between points

42
New cards

Euclidean distance

||x − x′||₂ = √(Σ (xᵢ − x′ᵢ)²)

43
New cards

Hamming distance

Counts mismatched entries

44
New cards

Jaccard distance

1 − (|A ∩ B| / |A ∪ B|)

45
New cards

Edit distance

Minimum edits to transform one string to another

46
New cards

Weighted KNN

Neighbors weighted by distance

47
New cards

Kernel regression

Generalization of weighted KNN

48
New cards

Decision tree

Model that splits data using feature-based rules

49
New cards

Internal node

Test on a feature

50
New cards

Branch

Outcome of a test

51
New cards

Leaf node

Final prediction

52
New cards

Decision tree property

Interpretable and nonlinear

53
New cards

CART

Classification and Regression Trees algorithm

54
New cards

Tree building strategy

Greedy top-down splitting

55
New cards

Node impurity

Measure of how mixed labels are

56
New cards

Gini impurity

1 − Σ pᵢ², measures probability of misclassification in a node

57
New cards

Gini range

0 (pure) to 0.5 (max impurity in binary)

58
New cards

Best split

Minimizes average Gini impurity

59
New cards

Tree pruning

Reducing size to prevent overfitting

60
New cards

Stopping conditions

Pure node, no features, or too few samples

61
New cards

Decision tree hyperparameters

Depth, min samples, etc.

62
New cards

Discriminative model

Learns P(y|x)

63
New cards

Generative model

Learns P(x,y)

64
New cards

Key difference

Generative can create data, discriminative cannot

65
New cards

Examples discriminative

Logistic regression, SVM

66
New cards

Examples generative

Naive Bayes, GMM

67
New cards

Naive Bayes

Generative classifier using Bayes rule

68
New cards

Bayes rule

P(A|B) = P(B|A)P(A) / P(B)

69
New cards

Naive assumption

Features are conditionally independent

70
New cards

Naive Bayes formula

P(y|x) ∝ P(y) Π P(xᵢ|y), denominator P(x) is ignored since it is constant

71
New cards

Advantage of NB

Simple and efficient

72
New cards

Limitation of NB

Independence assumption unrealistic

73
New cards

Supervised learning

Uses labeled data (x,y)

74
New cards

Unsupervised learning

Uses unlabeled data (x only)

75
New cards

Clustering

Grouping similar data points

76
New cards

K-means clustering

Partitions data into K clusters

77
New cards

K-means objective

Minimize Σ min_k ||xᵢ − μ_k||² (assign each point to nearest cluster center)

78
New cards

Cluster center (μₖ)

Mean of points in cluster

79
New cards

Assignment step

Assign to nearest center

80
New cards

Update step

Recompute centers

81
New cards

K-means limitation

Not convex, may find local minimum

82
New cards

Initialization sensitivity

Different starts give different results

83
New cards

K-means++

Better initialization strategy

84
New cards

Choosing K

Use elbow method

85
New cards

Elbow method

Find point where error reduction slows

86
New cards

Kernel K-means

Uses kernel trick for nonlinear clustering

87
New cards

Non-spherical clusters

Problem for standard K-means

88
New cards

Dimensionality reduction

Reduce number of features

89
New cards

Principal Component Analysis (PCA)

Find directions of max variance

90
New cards

Principal component

Direction capturing most variance

91
New cards

Covariance matrix

Measures feature relationships

92
New cards

First principal component

Eigenvector with largest eigenvalue

93
New cards

PCA objective

Maximize variance of projections subject to ||v|| = 1

94
New cards

Projection

Mapping data onto lower dimension

95
New cards

Orthogonality in PCA

Components are perpendicular

96
New cards

Eigenvalue meaning

Amount of variance captured

97
New cards

Eigenvector meaning

Direction of variance

98
New cards

Top-K PCA

Use top K eigenvectors

99
New cards

Purpose of PCA

Compression and noise reduction

100
New cards

w (weight vector)

A vector of parameters that defines the model decision boundary

Explore top notes

note
Chp 7: Listening Skills
Updated 1180d ago
0.0(0)
note
Landforms
Updated 1227d ago
0.0(0)
note
Abortion
Updated 1407d ago
0.0(0)
note
Chapter 9~ Civil Rights
Updated 1069d ago
0.0(0)
note
CHAPTER 1 & 2a
Updated 1164d ago
0.0(0)
note
Chp 7: Listening Skills
Updated 1180d ago
0.0(0)
note
Landforms
Updated 1227d ago
0.0(0)
note
Abortion
Updated 1407d ago
0.0(0)
note
Chapter 9~ Civil Rights
Updated 1069d ago
0.0(0)
note
CHAPTER 1 & 2a
Updated 1164d ago
0.0(0)

Explore top flashcards

flashcards
AP ENG LIT Root words Semester 1
27
Updated 1204d ago
0.0(0)
flashcards
MRE
107
Updated 1193d ago
0.0(0)
flashcards
Born a Crime chapter 4-8
41
Updated 1058d ago
0.0(0)
flashcards
Patient Care Unit 1-3
82
Updated 950d ago
0.0(0)
flashcards
finals
66
Updated 1058d ago
0.0(0)
flashcards
ENGLISH EXAM STUDY GUIDE
95
Updated 1050d ago
0.0(0)
flashcards
AP ENG LIT Root words Semester 1
27
Updated 1204d ago
0.0(0)
flashcards
MRE
107
Updated 1193d ago
0.0(0)
flashcards
Born a Crime chapter 4-8
41
Updated 1058d ago
0.0(0)
flashcards
Patient Care Unit 1-3
82
Updated 950d ago
0.0(0)
flashcards
finals
66
Updated 1058d ago
0.0(0)
flashcards
ENGLISH EXAM STUDY GUIDE
95
Updated 1050d ago
0.0(0)