Git Product home page Git Product logo

ames_housing's Introduction

Ames Housing Regression

The goal of this Kaggle competition is to predict the price that a house sells for given characteristics like its square footage, age and number of rooms. The dataset includes around 3000 houses that were sold in Ames, Iowa between 2006 and 2010.

Exploring the data

My first step was to explore the data, which you can see in EDA.ipynb. I focused on finding the features most associated with sale price, which were those related to house quality, square footage, neighborhood and garages. This isn't surprising. Of course bigger, 'nicer' houses tend to sell for more. And you know what they say about location...

Predictors of sale price

Building Models

I tried three linear models: ridge regression, elastic net and lasso, of which the lasso with an alpha of 0.001 performed best. It shrunk the coefficients for 80% of the features to zero. Below I've plotted the top 20 features by absolute value of their coefficients. MSZoning_C(all) is the largest, but it's a bit of an odd feature because it corresponds to properties with commercial zoning, and there are very few of them in the dataset.

Lasso Coefficients

I also built a stacking model (stack_to_svr_0.1173.ipynb), which performed better than just the lasso.

Files:

  • EDA.ipynb: exploring the data
  • linear_models.ipynb: preparing the data and fiting a lasso model
  • error_analysis.ipynb: examining the errors from the lasso model
  • huber.ipynb, knn.ipynb, random_forest.ipynb, ridge.ipynb, xgb1.ipynb: finding the best hyperparameters to use in a stacking ensemble
  • stack_to_svr_0.1173.ipynb: creating and fitting a stacking ensemble

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.