KMKaushal Mauryainkaushalml.hashnode.dev·Apr 12 · 4 min readLogistic 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 t00
KMKaushal Mauryainkaushalml.hashnode.dev·Mar 11 · 5 min readMultivariate 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 o00
KMKaushal Mauryainkaushalml.hashnode.dev·Feb 26 · 5 min readFrom 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 underst00
KMKaushal Mauryainkaushalm.hashnode.dev·Feb 26 · 2 min readTop 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,00
KMKaushal Mauryainkaushalm.hashnode.dev·Jan 21 · 2 min readScoring 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 ...00