Skip to main content

Posts

Showing posts from November, 2025

Classification Metrics - Confusion Matrix, Precision, Recall to ROC Curves

Topics: A. Classification Metrics B. Class Imbalance A. Classification Metrics Precision and recall are key metrics used to evaluate a machine learning model's performance, calculated using a confusion matrix. Precision measures the ratio of correctly predicted positive observations to the total number of positive predictions, answering "Of all the times the model predicted 'yes,' how often was it correct?". Recall measures the ratio of correctly predicted positive observations to all actual positive observations, answering "Of all the actual positive cases, how many did the model find?".   Lets cover these topics  "The Building Blocks: Understanding TP, TN, FP, and FN" Start with the foundation Use real examples (email spam, medical tests) "The Confusion Matrix: Your Performance Dashboard" Visual representation of the building blocks How to read and interpret it "Accuracy: The Misleading Metric" Why everyone starts here Why...

AI - ML - DL ->Artificial Intelligence - Machine Learning - Deep Learning

 Artificial Intelligence (AI) is the superset of Machine Learning (ML) Deep Learning (DL) Note 1: Non Neural Network Solutions includes Decision Trees, Random Forests, Linear Regression, Logistic Regression, Support Vector Machines (SVM), K-Means Clustering, K-Nearest Neighbors (KNN), Naive Bayes, Gradient Boosting, AdaBoost, Gaussian Processes, Hidden Markov Models, etc. Note 2: Neural Networks Have Become More Powerful Recently, including the Deep Learning (DL) Models - five reasons are given at the end of this blog. Does ML use neural networks? Short answer: Sometimes yes, but not always! The Hierarchy (Think of Parent/Child or Mater/Detail Relationship or Russian Nesting Dolls): 🔵 Artificial Intelligence (AI) - The biggest umbrella Everything that makes machines "smart" Includes: ML, rule-based systems, expert systems, robotics ↓ 🟢 Machine Learning (ML) - A subset of AI Algorithms that learn from data Includes: Neural networks AND many other metho...

Key Differences Between Classification and Clustering

Key Differences Between Classification & Clustering  A. Classification vs. Clustering: A Clear Distinction B. "30,000 Foot View" - The Bigger Picture C. Details D.  Logistic Regression [Logistic Regression is essentially Linear Regression passed through a Sigmoid function to get probabilities. Why it matters: When training Neural Networks, the computer needs to calculate derivatives millions of times. Because the derivative of Sigmoid is simply output * (1 - output), it is computationally very fast to calculate] D2. The Log-Zero Problem and Its Solution D3. Converting Binary to Multiclass Classification [what if you, instead of 0 and 1 have many classes] E. Logistic Regression is not Regression but a Classification F.  Why Cross-Entropy for Logistic Regression? [Cross-Entropy measures how different your predicted probability distribution is from the true distribution. It calculates the "surprise" when predicting wrongly - giving small penalties fo...