Logistic Regression: When the Output Must Be a ProbabilityWhen we want to predict a binary outcome: spam or not spam, tumor or benign, fraud or legitimate, the direct application of linear regression fails here—it can produce outputs less than 0 or greater tApr 12 · 4 min readkaushalml.hashnode.dev
Multivariate Linear Regression — From Intuition to AssumptionsIn the previous article, we explored Simple Linear Regression, where a model used one feature to predict an output. But real-world problems rarely depend on a single variable. For example, the price oMar 11 · 5 min readkaushalml.hashnode.dev
From Zero to Gradient Descent: A Deep Dive into Simple Linear RegressionMachine Learning often feels intimidating. Neural networks. Transformers. LLMs. Diffusion models. But behind all of them lies something surprisingly simple: Optimization. And the best place to understFeb 26 · 5 min readkaushalml.hashnode.dev
Top K Frequent Elements — When HashMaps Start Earning Their SalaryGiven an integer array nums and an integer k, return the k most frequent elements within the array. The test cases are generated such that the answer is always unique. Example 1: Input: nums = [1,2,2,Feb 26 · 2 min readkaushalm.hashnode.dev
Scoring a String: Or How I Accidentally Did ASCII Math AgainEver looked at a string and thought: “Yes, today I will subtract characters from each other.” No?Well, LeetCode did. Today’s problem is deceptively simple, which makes it dangerous — because you either: overthink it, or feel suspicious about how ...Jan 21 · 2 min readkaushalm.hashnode.dev