Algorithm Comparisons with Worked Examples

Compare machine learning, graph search, game tree, optimization, and pattern-mining algorithms through step-by-step worked examples. Each guide explains the key difference, calculations, tradeoffs, common mistakes, and when to use each approach.

Machine Learning

Classification, regression, clustering, ensembles, and evaluation methods compared through worked examples and practical tradeoffs.

14

Decision Tree vs. Random Forest

One readable decision tree versus many randomized trees combined for stability.

Bagging vs. Boosting

Independent model aggregation versus sequential error-correcting ensemble stages.

Confusion Matrix vs. ROC Curve

Exact errors at one threshold versus trade-offs across changing thresholds.

Random Forest vs. KNN

Randomized tree aggregation versus prediction from nearby stored examples.

KNN Classification vs. KNN Regression

Neighbor-label voting versus neighbor-value averaging from the same local data.

K-Means vs. Hierarchical Clustering

Fixed-k centroid refinement versus a nested hierarchy of clusters.

KNN vs. Naive Bayes

Local neighbor voting versus global class-probability scoring.

KNN vs. Decision Tree

Neighbor-based voting versus prediction through learned feature rules.

KNN vs. K-Means

Labeled-neighbor prediction versus unlabeled clustering around centroids.

Generative Models vs. Discriminative Models

Modeling how data is distributed versus predicting labels directly.

Decision Tree vs. Naive Bayes

Conditional feature splits versus class scores built from independent evidence.

Simple Linear Regression vs. Multiple Linear Regression

One predictor versus several predictors explaining the same target.

KNN Regression vs. Linear Regression

Local neighbor averaging versus one global fitted equation.

Multiple Linear Regression vs. Logistic Regression

Continuous-value prediction versus categorical probability estimation.

Game Trees & Adversarial Search

Adversarial search methods compared by decision rules, evaluation depth, pruning behavior, and explored game-tree nodes.

1

Missing a comparison? Request one