GithubHelp home page GithubHelp logo

dnn_from_scratch_py's Introduction

Note

The project should work with python 2 and 3.

About

This project provides the python code that supports this blog post (if you are a beginner, you should read it).

The goal is to make a neural network from scratch using numpy, then the same one using TensorFlow.

As a toy example, we try to predict the price of car using online data.

download_lbc_cars_data.py downloads data from leboncoin.fr, which is a website of classified ads. The data retrieved are about BMW Serie 1 (only one model of car).

For each BMW Serie 1 we save an input with the number of km, fuel, age and the price. The data are saved into car_features.csv.

These data are then normalized by normalize_lbc_cars_data.py to produce normalized_car_features.csv.

normalized_car_features.csv is used as input by dnn_from_scratch.py which is the neural network using numpy and dnn_from_scratch_tensorflow.py which is the neural network using TensorFlow.

predict.py is used to transform the data back and forth from the normalized to the human readeable version. For instance to predict a price, the user will input the raw car attributes. predict.py will convert the raw data to the normalized version and return them. The neural network output is also given to predict.py so that the user obtains a readable price and not a normalized one.

Overall results are pretty good knowing that the price is impacted by more than three attributes.

Network architecture

The architecture is pretty simple and well described in the blog post. Here is an illustration: Network architecture

Usage

A requirements.txt file exists at the root of the repository. Run pip install -r requirements.txt .

Issue

If you see a bad implementation or you come across a bug, open an issue. I'll help you.

dnn_from_scratch_py's People

Contributors

theflofly 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.