Close Menu
    Trending
    • Why Knowing Your Customer Drives Smarter Growth (and Higher Profits)
    • Stop Building AI Platforms | Towards Data Science
    • What If Your Portfolio Could Speak for You? | by Lusha Wang | Jun, 2025
    • High Paying, Six Figure Jobs For Recent Graduates: Report
    • What If I had AI in 2018: Rent the Runway Fulfillment Center Optimization
    • YouBot: Understanding YouTube Comments and Chatting Intelligently — An Engineer’s Perspective | by Sercan Teyhani | Jun, 2025
    • Inspiring Quotes From Brian Wilson of The Beach Boys
    • AI Is Not a Black Box (Relatively Speaking)
    Finance StarGate
    • Home
    • Artificial Intelligence
    • AI Technology
    • Data Science
    • Machine Learning
    • Finance
    • Passive Income
    Finance StarGate
    Home»Machine Learning»I Was Confused Too 🤯. In this short article, I aim to create… | by Alejandro Perez | Feb, 2025
    Machine Learning

    I Was Confused Too 🤯. In this short article, I aim to create… | by Alejandro Perez | Feb, 2025

    FinanceStarGateBy FinanceStarGateFebruary 12, 2025No Comments2 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    On this quick article, I purpose to create a set of 5 mnemonic guidelines to remove my confusion in regards to the Confusion Matrix.

    First Rule: Undesirable positives

    In binary classification, the “constructive” label doesn’t suggest that the result is “good” or “fascinating” — it simply signifies the category that’s of explicit curiosity or concern:

    • For shopper retention, the constructive class is a churned shopper 🫣
    • In a safety verify on the airport, the constructive class may very well be that the suspect carries a gun 🔫
    • In a medical check, the constructive class is that the affected person has the illness 🦠

    Second Rule: Predictions on prime, truths apart

    Use this rule to recollect how to attract the confusion matrix.

    Classical Confussion Matrix: Fact on the Facet, Prediction on Prime

    Third Rule: “Safety verify”

    I like to make use of the “Safety Test” Metaphor to make sense of the 4 quadrants:

    “The Safety Test”
    • 🙂 True Optimistic 🙂: Job properly carried out.
    • 🥲 False Optimistic 🥲: Sorry for embarrassing you, you may put your sneakers again on.
    • 😱 False Unfavorable 😱: We fucked-up.
    • ☺️ True Unfavorable ☺️: Job properly carried out.

    On this case, our mannequin must be tuned to reduce false negatives.

    Fourth Rule: To be exact we want all of the positives

    The confusion matrix is used to calculate two key metrics: precision and recall.

    SOFT_PRED = mannequin.predict_proba(X_test)[:, 1]  # Choose the second column (index 1) for all rows

    actual_positive = (y_test == 1)
    actual_negative = (y_test == 0)

    predicted_positive = (SOFT_PRED >= 0.5)
    predicted_negative = (SOFT_PRED

    true_positives = (predicted_positive & actual_positive).sum()
    false_positives = (predicted_positive & actual_negative).sum()

    true_negatives = (predicted_negative & actual_negative).sum()
    false_negatives = (predicted_negative & actual_positive).sum()

    Keep in mind, “precision makes use of all of the positives”. Precision measures the fraction of appropriate constructive predictions — out of all of the shoppers we recognized as churning, what number of churned?”

    precision = true_positives / (true_positives + false_positives)

    Fifth Rule: Recall is about re-calling all your pals

    What number of of your pals are you able to recall?

    • True Positives: The buddies you efficiently keep in mind.
    • False Negatives: The buddies you by accident neglect.
    recall = true_positives / (true_positives + false_negatives)

    A recall of 52% tells you that you simply didn’t name 48% of your pals

    Thanks for studying ❤️



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous Article5 ways having a financial plan can give you peace of mind
    Next Article Harnessing cloud and AI to power a sustainable future 
    FinanceStarGate

    Related Posts

    Machine Learning

    What If Your Portfolio Could Speak for You? | by Lusha Wang | Jun, 2025

    June 14, 2025
    Machine Learning

    YouBot: Understanding YouTube Comments and Chatting Intelligently — An Engineer’s Perspective | by Sercan Teyhani | Jun, 2025

    June 13, 2025
    Machine Learning

    From Accidents to Actuarial Accuracy: The Role of Assumption Validation in Insurance Claim Amount Prediction Using Linear Regression | by Ved Prakash | Jun, 2025

    June 13, 2025
    Add A Comment

    Comments are closed.

    Top Posts

    5 Things You Need to Stop Doing as a Solopreneur

    May 16, 2025

    IBM Unveils watsonx AI Labs in New York City

    June 2, 2025

    Microsoft Hikes Prices for Xbox Consoles, Controllers, Games

    May 4, 2025

    The Dangers of Deceptive Data–Confusing Charts and Misleading Headlines

    February 27, 2025

    Boston Celtics Are the Most Expensive Sports Sale Ever

    March 21, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Data Science
    • Finance
    • Machine Learning
    • Passive Income
    Most Popular

    AI Agents Processing Time Series and Large Dataframes

    April 22, 2025

    Inspired by the Masters? Bring Your Work Hustle to the Golf Course with Mind Caddie, Now $99.99.

    April 20, 2025

    Want to Monetize Your Hobby? Here’s What You Need to Do.

    June 4, 2025
    Our Picks

    What Are Autonomous AI Agents?. Autonomous AI agents represent the next… | by Raja Musa Khan | Apr, 2025

    April 27, 2025

    10 Modern Python Libraries You Are Missing Out On

    June 4, 2025

    Cornelis Launches CN5000: AI and HPC Scale-out Network

    June 3, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Data Science
    • Finance
    • Machine Learning
    • Passive Income
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2025 Financestargate.com All Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.