Back to Study Material Machine Learning

Common ML algorithms

Machine learning encompasses dozens of algorithms, each with distinct assumptions, strengths, and ideal use cases. Building intuition about the major famil...

Common ML algorithms

A Map of the Algorithmic Landscape

Machine learning encompasses dozens of algorithms, each with distinct assumptions, strengths, and ideal use cases. Building intuition about the major families helps practitioners choose a sensible starting point for any new problem.

Linear regression fits a straight line through data to predict a continuous output. It is interpretable and fast but assumes a linear relationship between features and target. Logistic regression extends the idea to classification by transforming the linear output through a sigmoid function to produce probabilities. Despite the word "regression" in its name, it is a classification algorithm.

Decision trees partition the feature space using a series of yes/no questions. They are easy to interpret and handle mixed data types, but a single tree is prone to overfitting. Ensemble methods like Random Forest and Gradient Boosting combine many trees to improve robustness and accuracy.

Support Vector Machines find a hyperplane that separates classes with the maximum possible margin. They perform well in high-dimensional spaces and were widely used before deep learning became dominant. K-nearest neighbors makes predictions by looking at the k training examples closest to a new point — simple and effective for low-dimensional data.

Neural networks and deep learning excel at unstructured data like images, audio, and text, learning hierarchical representations automatically. They require large amounts of data and computational power but have achieved state-of-the-art results across many domains.

A concrete example: a customer churn prediction project might start with logistic regression to establish a baseline, then try gradient boosting to capture non-linear patterns, comparing both using cross-validated AUC scores.

Exam tip: always be able to state at least one scenario where each algorithm shines and one scenario where it struggles. Interviewers value practical judgment over memorized descriptions.