ml test 5 flashcards

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

1/34

encourage image

There's no tags or description

Looks like no tags are added yet.

35 Terms

1
New cards

Manhattan (L1) Distance

The formula for calculating distance between two points A and B is \|x1 − x2| + |y1 − y2|. Example: A=(1,2), B=(4,6) → |1−4| + |2−6| = 3 + 4 = 7.

2
New cards

Euclidean (L2) Distance

The formula for calculating distance between two points A and B is √((x1−x2)² + (y1−y2)²). Example: A=(1,2), B=(4,6) → √(9+16) = √25 = 5.

3
New cards

Cosine Similarity

Measures the angle between two vectors - not their magnitude. Formula: cos(θ) = (A · B) / (||A|| × ||B||). Result: between −1 and 1.

4
New cards

Accuracy

(True Positives + True Negatives) / Total Predictions. The fraction of all predictions that were correct.

5
New cards

Precision

True Positives / (True Positives + False Positives). Of everything the model predicted as positive, how many actually were?

6
New cards

Recall (Sensitivity)

True Positives / (True Positives + False Negatives). Of all actual positives, how many did the model catch?

7
New cards

F1-Score

2 × (Precision × Recall) / (Precision + Recall). The harmonic mean of Precision and Recall.

8
New cards

MCC (Matthews Correlation Coefficient)

Accounts for all four cells of the confusion matrix (TP, TN, FP, FN). Scores from −1 to +1; good for imbalanced datasets.

9
New cards

ROC Curve vs. Precision-Recall Curve

ROC plots True Positive Rate vs. False Positive Rate; PR Curve plots Precision vs. Recall. ROC is for balanced datasets, PR for imbalanced.

10
New cards

Bag of Words (BoW)

Counts word frequencies in a document but ignores grammar and order. Main limitation: treats all words equally, missing context.

11
New cards

TF-IDF

Balances how often a word appears in a document against how rare it is across all documents, improving on BoW.

12
New cards

Principal Component Analysis (PCA)

An unsupervised dimensionality reduction technique that finds directions with maximum variance and projects data onto those directions.

13
New cards

Collinearity

When features are highly correlated, leading to unstable model weights and misleading feature importance.

14
New cards

Parametric Model

A model with a predetermined number of parameters determined before training (e.g., Linear Regression).

15
New cards

Non-Parametric Model

A model whose complexity grows with data; it has no fixed distributional assumptions (e.g., KNN).

16
New cards

Convolutional Layer

Applies a filter to an image, producing a feature map that detects specific patterns.

17
New cards

ReLU Activation Function

Introduces non-linearity by applying max(0, x) to the output of neurons, which allows for complex feature learning.

18
New cards

Max Pooling

Downsamples the spatial dimensions of the feature map, reduces computation, and provides translation invariance.

19
New cards

Learning Rate Warmup

Starts with a very low learning rate and gradually increases it to prevent model divergence in early training.

20
New cards

Data Augmentation

Artificially expands training data diversity through techniques like flips, rotations, or brightness adjustments.

21
New cards

Dropout

Randomly zeros out a fraction of neurons during training to force redundancy and prevent overfitting.

22
New cards

Softmax

Converts logits into a probability distribution where all values are between 0 and 1, summing to 1.

23
New cards

Dense Layer

A layer in neural networks where every input neuron connects to every output neuron, learning weights and biases.

24
New cards

XOR Problem

Not linearly separable; cannot be solved by a single-layer perceptron due to the need for non-linear decision boundaries.

25
New cards

Validation Set vs. Test Set

Validation set is used during training to tune hyperparameters; Test set is used only once to evaluate final model performance.

26
New cards

Oversampling

Adding synthetic examples to the minority class to balance datasets, such as generating similar examples to existing ones.

27
New cards

Undersampling

Removing examples from the majority class to balance the dataset, which risks discarding potentially useful information.

28
New cards

Gaussian Mixture Models (GMMs)

Differ from K-Means by making soft assignments, providing probabilities for cluster membership instead of hard assignments.

29
New cards

Neural Network Training Steps

(1) optimizer.zero_grad() (2) forward pass (3) compute loss (4) backward pass (5) update weights.

30
New cards

Universal Approximation Theorem

States that a feed-forward network can approximate any continuous function; has limitations regarding neuron count and trainability.

31
New cards

Degradation Problem

Performance may drop in deeper networks due to difficulty learning identity functions; skip connections are one solution.

32
New cards

Batch Normalization

Normalizes layer activations to stabilize learning and allow for higher learning rates, reducing sensitivity to weight initialization.

33
New cards

Early Stopping

Halts training when validation loss stops improving, with patience indicating the number of epochs to wait.

34
New cards

ImageNet

A large dataset containing 1.2 million high-resolution images, posing ethical concerns regarding labor exploitation.

35
New cards

MNIST Dataset

Contains 70,000 grayscale images of handwritten digits (0-9), split into 60,000 training and 10,000 testing images.