1/34
Looks like no tags are added yet.
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.
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.
Cosine Similarity
Measures the angle between two vectors - not their magnitude. Formula: cos(θ) = (A · B) / (||A|| × ||B||). Result: between −1 and 1.
Accuracy
(True Positives + True Negatives) / Total Predictions. The fraction of all predictions that were correct.
Precision
True Positives / (True Positives + False Positives). Of everything the model predicted as positive, how many actually were?
Recall (Sensitivity)
True Positives / (True Positives + False Negatives). Of all actual positives, how many did the model catch?
F1-Score
2 × (Precision × Recall) / (Precision + Recall). The harmonic mean of Precision and Recall.
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.
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.
Bag of Words (BoW)
Counts word frequencies in a document but ignores grammar and order. Main limitation: treats all words equally, missing context.
TF-IDF
Balances how often a word appears in a document against how rare it is across all documents, improving on BoW.
Principal Component Analysis (PCA)
An unsupervised dimensionality reduction technique that finds directions with maximum variance and projects data onto those directions.
Collinearity
When features are highly correlated, leading to unstable model weights and misleading feature importance.
Parametric Model
A model with a predetermined number of parameters determined before training (e.g., Linear Regression).
Non-Parametric Model
A model whose complexity grows with data; it has no fixed distributional assumptions (e.g., KNN).
Convolutional Layer
Applies a filter to an image, producing a feature map that detects specific patterns.
ReLU Activation Function
Introduces non-linearity by applying max(0, x) to the output of neurons, which allows for complex feature learning.
Max Pooling
Downsamples the spatial dimensions of the feature map, reduces computation, and provides translation invariance.
Learning Rate Warmup
Starts with a very low learning rate and gradually increases it to prevent model divergence in early training.
Data Augmentation
Artificially expands training data diversity through techniques like flips, rotations, or brightness adjustments.
Dropout
Randomly zeros out a fraction of neurons during training to force redundancy and prevent overfitting.
Softmax
Converts logits into a probability distribution where all values are between 0 and 1, summing to 1.
Dense Layer
A layer in neural networks where every input neuron connects to every output neuron, learning weights and biases.
XOR Problem
Not linearly separable; cannot be solved by a single-layer perceptron due to the need for non-linear decision boundaries.
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.
Oversampling
Adding synthetic examples to the minority class to balance datasets, such as generating similar examples to existing ones.
Undersampling
Removing examples from the majority class to balance the dataset, which risks discarding potentially useful information.
Gaussian Mixture Models (GMMs)
Differ from K-Means by making soft assignments, providing probabilities for cluster membership instead of hard assignments.
Neural Network Training Steps
(1) optimizer.zero_grad() (2) forward pass (3) compute loss (4) backward pass (5) update weights.
Universal Approximation Theorem
States that a feed-forward network can approximate any continuous function; has limitations regarding neuron count and trainability.
Degradation Problem
Performance may drop in deeper networks due to difficulty learning identity functions; skip connections are one solution.
Batch Normalization
Normalizes layer activations to stabilize learning and allow for higher learning rates, reducing sensitivity to weight initialization.
Early Stopping
Halts training when validation loss stops improving, with patience indicating the number of epochs to wait.
ImageNet
A large dataset containing 1.2 million high-resolution images, posing ethical concerns regarding labor exploitation.
MNIST Dataset
Contains 70,000 grayscale images of handwritten digits (0-9), split into 60,000 training and 10,000 testing images.