Close Menu
    Trending
    • Agentic AI Patterns. Introduction | by özkan uysal | Aug, 2025
    • 10 Things That Separate Successful Founders From the Unsuccessful
    • Tested an AI Crypto Trading Bot That Works With Binance
    • The Rise of Data & ML Engineers: Why Every Tech Team Needs Them | by Nehal kapgate | Aug, 2025
    • Build Smarter Workflows With Lifetime Access to This Project Management Course Pack
    • Tried Promptchan So You Don’t Have To: My Honest Review
    • The Cage Gets Quieter, But I Still Sing | by Oriel S Memory | Aug, 2025
    • What Quiet Leadership Looks Like in a Loud World
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Machine Learning»When Linear Regression Doesn’t Work: Analysis of House Prices in Canada | by Natalia Goncharenko | Jul, 2025
    Machine Learning

    When Linear Regression Doesn’t Work: Analysis of House Prices in Canada | by Natalia Goncharenko | Jul, 2025

    Team_AIBS NewsBy Team_AIBS NewsJuly 24, 2025No Comments3 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Zoom picture shall be displayed

    Linear regression is a primary machine studying software usually used to foretell numbers. It’s easy and clear, nevertheless it wants the correct information to work nicely. On this challenge, I attempted to foretell home costs in Canada utilizing a dataset from Kaggle (Canadian House Prices for Top Cities). The outcomes weren’t nice, however I discovered lots about what linear regression can and may’t do. This text explains my steps, outcomes, and classes.

    The dataset has details about homes in huge Canadian cities. It consists of:

    • Value (what we need to predict)
    • Variety of bedrooms and bogs
    • Metropolis, province, inhabitants, and household earnings
    • Location (latitude, longitude) and addresses

    The dataset has 35,768 homes. However some information was unusual, like homes with 60+ bedrooms, so I wanted to scrub it.

    To get the information prepared, I did these steps:

    1. Eliminated columns that don’t work for the mannequin: Tackle, Metropolis, Latitude, Longitude.

    2. Modified Province into numbers (one-hot encoding) to make use of location.

    3. Modified the Value with a math trick (logarithm) as a result of costs have been very totally different (from 21,500 to 37,000,000).

    4. Made numbers like Inhabitants, Family_Income, Bedrooms, and Bogs related in measurement utilizing a software (StandardScaler).

    5. Eliminated unusual homes with greater than 10 bedrooms or bogs (12 homes).

    After cleansing, the dataset had 35,756 homes and 12 options.

    I cut up the information: 80% to coach the mannequin and 20% to check it. I used linear regression on the modified costs, then turned predictions again to regular costs to test outcomes. The scores have been:

    • R²: 0.2492 (how nicely the mannequin explains the information)
    • RMSE: 964,286.98 (how huge the errors are)

    The R² rating (0.2492) was low, so the mannequin didn’t clarify the costs nicely. The RMSE (964,286.98) confirmed huge errors in predictions. Linear regression didn’t work as a result of home costs depend upon many issues not within the dataset, like home measurement or neighborhood.

    To make issues simpler, I made a smaller dataset with solely homes from Winnipeg (455 homes). I used simply two options: Bedrooms and Bogs. I didn’t change the costs this time as a result of they have been much less excessive (from 69,900 to 968,800).

    I cut up the information once more: 80% for coaching, 20% for testing. I used linear regression. The scores have been:

    • R²: 0.3786
    • RMSE: 149,399.03

    The R² rating (0.3786) was a bit higher, however nonetheless not good. The RMSE (149,399.03) confirmed the mannequin nonetheless made huge errors. Even with less complicated information, linear regression didn’t work nicely as a result of costs depend upon extra than simply bedrooms and bogs.

    This challenge confirmed me what linear regression can’t do:

    1. Complicated Issues: Home costs depend upon many issues (measurement, age, location, financial system). Linear regression expects easy connections, however the information was too sophisticated.
    2. Dangerous Information: Unusual information (like 60+ bedrooms) and lacking essential options made the mannequin worse.
    3. Limits of the Software: Linear regression is robust for easy issues, nevertheless it wants the correct information. It received’t work on simply any dataset.

    This challenge helped me perceive linear regression higher. It’s a superb software, however not for each downside. To make it work, you want clear information with the correct options and easy connections.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleIn the Latest Space Race, It’s China vs. SpaceX
    Next Article Shopos Raises $20M, Backed by Binny Bansal: What’s Next for E-Commerce?
    Team_AIBS News
    • Website

    Related Posts

    Machine Learning

    Agentic AI Patterns. Introduction | by özkan uysal | Aug, 2025

    August 3, 2025
    Machine Learning

    The Rise of Data & ML Engineers: Why Every Tech Team Needs Them | by Nehal kapgate | Aug, 2025

    August 3, 2025
    Machine Learning

    The Cage Gets Quieter, But I Still Sing | by Oriel S Memory | Aug, 2025

    August 3, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    Agentic AI Patterns. Introduction | by özkan uysal | Aug, 2025

    August 3, 2025

    I Tried Buying a Car Through Amazon: Here Are the Pros, Cons

    December 10, 2024

    Amazon and eBay to pay ‘fair share’ for e-waste recycling

    December 10, 2024

    Artificial Intelligence Concerns & Predictions For 2025

    December 10, 2024

    Barbara Corcoran: Entrepreneurs Must ‘Embrace Change’

    December 10, 2024
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    Most Popular

    Palantir and The Nuclear Company Partner on Platform to Scale Nuclear Deployment

    June 26, 2025

    20 Strange Scientific Facts That Will Blow Your Mind | by NIRESHRAJ R D | Apr, 2025

    April 18, 2025

    IEEE Standards Legend Koepfinger Passes at 99

    April 25, 2025
    Our Picks

    Agentic AI Patterns. Introduction | by özkan uysal | Aug, 2025

    August 3, 2025

    10 Things That Separate Successful Founders From the Unsuccessful

    August 3, 2025

    Tested an AI Crypto Trading Bot That Works With Binance

    August 3, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 Aibsnews.comAll Rights Reserved.

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