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.
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.
Graph Search
Uninformed and informed search methods compared by frontier rules, optimality, completeness, time, memory, and worked traces.
Uniform Cost Search (UCS) vs. Breadth-First Search (BFS)
Minimum total path cost versus minimum edge count.
A* Search vs. Greedy Best-First Search
Cost-aware pathfinding versus heuristic-only search that may reach goals sooner.
Breadth-First Search (BFS) vs. Depth-First Search (DFS)
Fewest-edge level search versus branch-first traversal with depth-shaped memory.
A* Search vs. Uniform Cost Search
Optimal search with versus cost-only search with .
Greedy Best-First Search vs. Uniform Cost Search
Heuristic-only goal pursuit versus cost-ordered cheapest-path search.
Game Trees & Adversarial Search
Adversarial search methods compared by decision rules, evaluation depth, pruning behavior, and explored game-tree nodes.
Optimization & Evolutionary
Exact, approximate, and evolutionary methods compared by guarantees, fitness design, constraints, and search tradeoffs.
Missing a comparison? Request one