Git Product home page Git Product logo

boston_house_prices's Introduction

Boston House Prices Dataset

In this project will be bulit neural network model which must compute the price of the house in Boston according to some prepared data


For the project, there've been used

  1. pandas, numpy, os
  2. matplotlib
  3. pathlib
  4. tensorflow, keras (sequential, layers, dense, flatten, batchnoramliztaion, etc.)
  5. matplotlib
  6. sickit-learn.model_selection.train_test_split

Starting

We'll import all the nescessary modules, use Pandas to make pandas dataframe and see that we've got

then check the .details() to be sure we don't have missing values, othervise we must use "impute" to build that missing values

then we can save from our dataset the last 'n' rows, for future testings, if we need it. Next we shuffle our data with .sample and keeping the 90%


Splitting

We'll use sickit-learn's model_selection.train_test_split to split our dataset into "train" and "some_test"

then just split again "some_test" into "valid" and "test" (50% for each of them)

We need to pop each of newmade datasets to make our labels.

And we can see that our dataset's values aren't scaled, so we can make special function for normalization (we could use StandardScaler() instead)


Making the model

We'll use Keras and Tensorflow to build our model.

our model will have 7 layers (1 input , 1 output , 5 hidden)

each of them will have 'selu' activation and we'll use batch_normalization before each time we move to the next layer

here's the summary of our model:

Screen Shot 2023-08-08 at 15 50 04

Start the training

Start the training with the used number of batch_size and epochs

after that we'll get our "loss" "mse" "mae" "mape" for our train and validation sets

with .history() we can check them


Testing

For the test, just take some datapoints from test dataset (for example 10 datapoints) and train our model on them

Visualization

with special modules , we can see the process of the training according to the changes of trainig and validation sets

download (2)

In some point as our dataset isn't that large or it's noisy MIGHT get overfitted.

and in this graphic we can see the linear relation between our predicted values and the truth ones.

download (3)

boston_house_prices's People

Contributors

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