Code Monkey home page Code Monkey logo

swedish-housing-market-ml's Introduction

Untitled-1

VärderingsMaskinen - A machine learned valuator for the swedish housing market

Project Overview

The housing market has always been a challenge to predict. In 2023 house prices decreased by 6%, but in general apartment prices increased. Housing in Sweden in the last 12 years alone has risen an astounding 85% (adjusted to inflation) to the top of 2021 but has fallen a bit since then. With housing prices of a median of 2.3 million Swedish krona, buying residency is often the biggest investment a person makes in their life. The best way to sell a house has always, throughout time, been to valuate it with a broker. The broker checks the price similarity in the region, area, and street. Calculates the average price per square meter and then takes the seller’s apartment size and calculates accordingly. The amount of rooms, balcony, and the age of the apartment may vary the listing price, but it is usually the bidding price that is harder to predict, since time, economy and many other factors can change it a lot.

But how can a buyer valuate a house listing? The current landscape lacks simple solutions for non-experienced buyers, and navigating though real estate data can be a perplexing task and the buyer could lose their interest. Relying entirely on a broker’s valuation poses its own challenges, as these valuations might fluctuate. There is a need for a simple solution that only relies on data, and is easy to use. That is why VarderingsMaskingen ( ¨ The Valuation Machine) will valuate almost any housing, even if the sort of housing doesn’t even exist. It uses Random Forest Regressor to learn from a database including 600,000 different listings and gets a mean error of 9% of the mean price.

Table of Contents

Features

  • Valuator: Uses a 600k large database of swedish housing market and random forest regressor to predict it.
  • GUI: Python flask GUI for easier usage.

Requirements

  • Python 3.7.0 or higher
  • Pip
  • Network connection

Installation

  1. Download the project files using either git or manual download.
  2. Open a terminal and navigate to the project directory.
  3. Run the following command to install the required dependencies:
    pip install -r requirements.txt

Getting Started

  1. Navigate to the /data/ directory and unzip the prop.rar. Ensure the extracted file is named prop.json.
  2. (Auto creation). Execute the following command for automatic creation, note that is usually trains within 10 minutes:
    python autocreate.py
    -OR-
  3. (Manual creation / Teacher variant). Open the create.ipynb Jupyter notebook file and execute the provided steps. Note: Some steps may not be necessary, follow the instructions in the notebook. This process may take a maximum of 10 minutes.
  4. Start the valuator by running:
    python vm.py
  5. Open your web browser and go to 127.0.0.1:5000.

Configuration

The create.ipynb Jupyter notebook file can be modified to implement different approaches to the problem.

Usage

  1. Visit 127.0.0.1:5000 in your web browser.
  2. Enter the required criteria (all are mandatory; enter 0 if there is no specific value).
  3. Wait for approximately 10 seconds.
  4. Review the results.

Known Issues

  • Occasionally, Nominatim may encounter SSL certificate errors. This issue seems to have been resolved in the latest release. If encountered, try refreshing the SSL certificates in Python requests to resolve the problem. To fix the issue for me, i used these commands
python -m pip install python-certifi-win32
pip install  --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org python-certifi-win32

Thank you

swedish-housing-market-ml's People

Contributors

frankuman avatar

Stargazers

 avatar

Watchers

 avatar

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.