Gradient Boosting Explained: 5 Ideas Behind XGBoost
Gradient boosting adds shallow trees in sequence, each fixing the last one’s errors. Learning rate, early stopping, and how it differs from a random forest.
Gradient boosting adds shallow trees in sequence, each fixing the last one’s errors. Learning rate, early stopping, and how it differs from a random forest.
A transformer stacks attention and feed-forward layers. Positional encoding, residual connections, encoder vs decoder, and the real reason it replaced everything.
Finding outliers with the IQR rule and z-scores, why masking defeats one of them, and when removing outliers destroys the very signal you needed.
k-means clustering groups unlabelled data by alternating assign and move steps. A worked example, choosing k with the elbow method, and how it differs from k-NN.
Naive Bayes multiplies feature probabilities and picks the winner. Why its independence assumption is false but harmless, and why you should not trust its confidence.
Attention lets every token look at every other token. Query, key and value explained with a library analogy, the formula broken into four steps, and why it costs so much.
Encoding categorical variables without inventing false orderings: one-hot vs ordinal vs target encoding, handling high cardinality, and avoiding leakage.
k-nearest neighbours predicts by voting among the closest points. How to choose k, why feature scaling is mandatory, and where the curse of dimensionality breaks it.
A support vector machine finds the widest margin between classes. Support vectors, the C parameter, the kernel trick, and why scaling is not optional.
Embeddings turn text into vectors where distance means similarity. Cosine similarity, why they beat keyword search, and the cautions before building on them.