ML, AI, DS, Algorithms, Interview Prep

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

1/205

encourage image

There's no tags or description

Looks like no tags are added yet.

206 Terms

1
New cards

Vector

Ordered collection of numbers representing features or directions.

2
New cards

Matrix

Rectangular array of values used for linear transformations and batched computations.

3
New cards

Dot product

Sum of pairwise products; measures alignment and computes linear model scores.

4
New cards

Eigenvector and eigenvalue

A direction unchanged by a matrix transformation except for scaling; the scale is its eigenvalue.

5
New cards

Gradient

Vector of partial derivatives pointing toward steepest local increase of a function.

6
New cards

Chain rule

Computes derivatives of compositions; foundational to backpropagation.

7
New cards

Bayes' theorem

P(A|B)=P(B|A)P(A)/P(B); updates prior beliefs using evidence.

8
New cards

Conditional probability

Probability of A given B: P(A∩B)/P(B), when P(B)>0.

9
New cards

Expected value

Probability-weighted average of possible outcomes.

10
New cards

Variance

Expected squared deviation from the mean; measures dispersion.

11
New cards

Covariance

Measures how two variables vary together; scale-dependent.

12
New cards

Correlation

Normalized covariance, typically between -1 and 1.

13
New cards

Central limit theorem

Under suitable conditions, normalized sample means approach a normal distribution as sample size grows.

14
New cards

Confidence interval

Interval procedure that captures the fixed population parameter at a specified long-run frequency.

15
New cards

p-value

Probability, assuming the null hypothesis and model, of results at least as extreme as observed.

16
New cards

Type I vs Type II error

Type I: reject a true null; Type II: fail to reject a false null.

17
New cards

Maximum likelihood estimation

Choose parameters maximizing the probability or density of observed data.

18
New cards

Gradient descent

Iteratively update parameters opposite the gradient: θ←θ−η∇L.

19
New cards

Learning rate

Step size of parameter updates; too high can diverge, too low can train slowly.

20
New cards

Feature scaling

Rescale numeric features to comparable magnitudes, often important for SVMs and gradient-based models.

21
New cards

Standardization

Transform using (x−training mean)/training standard deviation; fit statistics on training data only.

22
New cards

One-hot encoding

Represent categories with indicator columns; handle unseen categories explicitly.

23
New cards

Data leakage

Information unavailable at prediction time contaminates training or evaluation and inflates measured performance.

24
New cards

Train/validation/test split

Train fits parameters, validation selects settings, test estimates final generalization.

25
New cards

Stratified sampling

Preserve approximate class proportions across splits.

26
New cards

Cross-validation

Repeatedly fit and evaluate across folds to estimate performance and tune models.

27
New cards

Missing data mechanisms

MCAR: unrelated to values; MAR: explained by observed data; MNAR: depends on unobserved/missing values.

28
New cards

Class imbalance

Unequal label frequencies; use suitable metrics, stratification, weighting, and threshold selection.

29
New cards

Supervised learning

Learn from labeled input-output examples for classification or regression.

30
New cards

Unsupervised learning

Find patterns or structure in unlabeled data.

31
New cards

Regression vs classification

Regression predicts continuous values; classification predicts categories.

32
New cards

Linear regression

Predicts continuous outcomes as weighted feature sums, often minimizing squared error.

33
New cards

Logistic regression

Linear log-odds model using sigmoid for binary class probabilities.

34
New cards

L1 regularization

Penalizes sum of absolute coefficients; can yield sparse weights.

35
New cards

L2 regularization

Penalizes squared coefficient magnitudes; shrinks weights.

36
New cards

Bias-variance tradeoff

Too-simple models underfit; overly flexible models may overfit; regularization and data affect both.

37
New cards

Decision tree

Recursively partitions feature space using split criteria such as Gini impurity.

38
New cards

Random forest

Bagged ensemble of randomized trees that reduces variance relative to a single tree.

39
New cards

Gradient boosting

Sequentially adds weak learners to improve an objective using gradient information.

40
New cards

XGBoost

Optimized gradient-boosted tree library with regularization and efficient split finding.

41
New cards

Support vector machine

Classifier maximizing margin; kernels enable nonlinear decision boundaries.

42
New cards

RBF kernel

Similarity exp(−γ||x−x'||²); enables nonlinear SVM boundaries.

43
New cards

k-nearest neighbors

Predict using labels or values of nearby training samples; sensitive to distance scaling.

44
New cards

Naive Bayes

Probabilistic classifier assuming conditional independence of features given class.

45
New cards

K-means

Partitions observations into k clusters by minimizing within-cluster squared distances.

46
New cards

DBSCAN

Density-based clustering that identifies dense groups and marks sparse points as noise.

47
New cards

PCA

Finds orthogonal directions of maximal variance for dimensionality reduction.

48
New cards

t-SNE vs UMAP

Nonlinear visualization techniques; local neighborhood structure matters, and plot distances need caution.

49
New cards

ROC AUC

Probability a randomly selected positive scores higher than a randomly selected negative, with tie adjustment.

50
New cards

Precision

TP/(TP+FP): proportion of predicted positives that are correct.

51
New cards

Recall

TP/(TP+FN): proportion of actual positives detected.

52
New cards

F1 score

Harmonic mean of precision and recall: 2PR/(P+R).

53
New cards

PR AUC

Summarizes precision-recall tradeoff; often informative for rare positive classes.

54
New cards

Calibration

Agreement between predicted probabilities and observed outcome frequencies.

55
New cards

Threshold tuning

Choose decision cutoff using business costs and validation data; ranking AUC alone does not select a threshold.

56
New cards

Confusion matrix

Counts true positives, false positives, true negatives, and false negatives.

57
New cards

Hyperparameter tuning

Search settings such as depth, regularization, or learning rate without using the test set.

58
New cards

Early stopping

Stop training when validation performance stops improving to limit overfitting.

59
New cards

Stacking ensemble

Train a meta-model on out-of-fold predictions of base models to avoid leakage.

60
New cards

Permutation importance

Measure performance degradation after shuffling a feature; correlated features complicate interpretation.

61
New cards

SHAP

Shapley-based feature attribution method; explanations are model-relative, not automatically causal.

62
New cards

Perceptron

Single neuron computing an activation of a weighted sum plus bias.

63
New cards

MLP

Feedforward neural network with one or more hidden layers.

64
New cards

ReLU

Activation max(0,x), common in deep networks.

65
New cards

Sigmoid

Maps real values to (0,1), often used for binary output probabilities.

66
New cards

Softmax

Converts logits into normalized class probabilities.

67
New cards

Cross-entropy loss

Penalizes low predicted probability for the true class.

68
New cards

Backpropagation

Efficiently computes parameter gradients through a computation graph via chain rule.

69
New cards

Adam optimizer

Adaptive first- and second-moment gradient optimizer.

70
New cards

Batch normalization

Normalizes intermediate activations using batch statistics and learned scale/shift.

71
New cards

Layer normalization

Normalizes across features within each example; common in transformers.

72
New cards

Dropout

Randomly masks activations during training to regularize.

73
New cards

CNN

Neural network using shared convolutional filters to exploit spatial structure.

74
New cards

RNN vs LSTM

RNN processes sequences recurrently; LSTM gates help retain long-range information.

75
New cards

Attention

Computes weighted combinations of values based on query-key similarity.

76
New cards

Self-attention

Tokens attend to other tokens in the same sequence.

77
New cards

Transformer

Architecture built around attention, feedforward blocks, residual connections, and normalization.

78
New cards

Positional encoding

Provides token-order information to otherwise order-agnostic attention operations.

79
New cards

Tokenization

Splits text into model input units such as subwords; token counts differ from word counts.

80
New cards

Embedding

Dense vector representation of an item, token, or passage.

81
New cards

Cosine similarity

Dot product divided by vector norms; compares vector direction.

82
New cards

Pretraining

Learn broad representations from large-scale data before downstream adaptation.

83
New cards

Fine-tuning

Update pretrained model weights on task-specific data.

84
New cards

LoRA

Parameter-efficient adaptation using trainable low-rank updates to selected weights.

85
New cards

Instruction tuning

Train a model to follow prompt-response instructions.

86
New cards

RLHF

Use human preference signals and reinforcement-learning-style optimization to align outputs.

87
New cards

DPO

Direct preference optimization of a language model using preference pairs without an explicit reward-model RL loop.

88
New cards

RAG

Retrieve external documents and condition generation on retrieved evidence.

89
New cards

Vector database

Stores embeddings and supports similarity or approximate-nearest-neighbor search.

90
New cards

Chunking

Split documents into retrievable pieces; size and overlap affect recall and context quality.

91
New cards

Hybrid retrieval

Combine lexical matching such as BM25 with semantic vector retrieval.

92
New cards

Reranker

Reorders retrieved candidates with a more expensive relevance model.

93
New cards

Hallucination

Model output that is unsupported or false despite sounding plausible.

94
New cards

Prompt injection

Untrusted content attempts to override system or developer instructions; enforce trust boundaries.

95
New cards

Tool calling

Model selects structured tool actions; application validates permissions, arguments, and outputs.

96
New cards

AI agent

System that plans and invokes tools across steps toward a goal, with guardrails and stopping criteria.

97
New cards

Context window

Maximum amount of input/output token context supported by a model invocation.

98
New cards

Temperature

Sampling control affecting output randomness; does not guarantee factuality.

99
New cards

Top-p sampling

Samples from smallest token set whose cumulative probability reaches p.

100
New cards

Quantization

Represent weights/activations at lower precision to reduce memory and often accelerate inference.