Giter Club home page Giter Club logo

housing_prediciton's Introduction

housing_prediciton

Welcome to Machine Learning Housing Corporation! The first task you are asked to perform is to build a model of housing prices in California using the California cen‐ sus data. This data has metrics such as the population, median income, median hous‐ ing price, and so on for each block group in California. Block groups are the smallest geographical unit for which the US Census Bureau publishes sample data (a block group typically has a population of 600 to 3,000 people). We will just call them “dis‐ tricts” for short. Your model should learn from this data and be able to predict the median housing price in any district, given all the other metrics.

Main step for machine Learning Projects.

  1. Look at the big picture.
  2. Get the data.
  3. Discover and visualize the data to gain insights.
  4. Prepare the data for Machine Learning algorithms.
  5. Select a model and train it.
  6. Fine-tune your model.
  7. Present your solution.
  8. Launch, monitor, and maintain your system.

Follow below instruction to start your projects.

  1. Create a github repo.
  2. Clone github repo in your system
git clone <github-url>
  1. Open folder in vscode.

  2. Create project folder structure based on standard practices.

    First download a bash script file.

Download initial script file.
  1. Run bash script using below command
bash <script_name>

Update setup.py file with following contain

from setuptools import setup, find_packages

REQUIREMENT_FILE_NAME = "requirements.txt"
REMOVE_PACKAGE = "-e ."


def get_requirement_list(requirement_file_name=REQUIREMENT_FILE_NAME) -> list:
    try:
        requirement_list = None
        with open(requirement_file_name) as requirement_file:
            requirement_list = [requirement.replace("\n", "") for requirement in requirement_file]
            requirement_list.remove(REMOVE_PACKAGE)
        return requirement_list
    except Exception as e:
        raise e


setup(
    name="Housing price prediction",
    license="MIT",
    version="0.0.0",
    description="Project has been completed.",
    author="Avnish Yadav",
    packages=find_packages(),
    install_requires=get_requirement_list()
)
  1. Add following library in requirements.txt file.
scikit-learn
scipy 
PyYAML
gunicorn
pandas
-e .
six
dill
Flask
  1. Create a app.py and create a sample hello world flask app.

  2. To send changes to github repo

To add all changes into git stage

git add .

To check all files that we are about to commit.

git status 

Commit all files added in git stage

git commit -m "<message>"

If your git account is not configured.

Execute below command to configure your git.

git config --global user.name "<user>"
git config --global user.email "<user_email>"

To check remote branch url

git remote -v

To send your commit to remote branch

git push <var_name> <branch_name>

update your commited files in github repo

git push origin main

Create an Account at heroku

Create an App at heroku We need 3 information to setup github action

  1. Heroku API KEY
  2. Heroku APP Name
  3. Heroku Account Emaild Id

Let's create a docker file for our application

Create file .dockerignore and Dockerfile

Create a folder directory .github/workflows/main.yaml

Check github workflow code from below link.

Build and Deploy Docker image to Heroku container.

Add the content from above webpage.

Add repo secret in github

Note: Kindly check your variable name in github/workflows/main.yaml file.

setting> secrets> Add new Repository Secrets.

Add folder name in .dockerignore file that are not needed in Docker image

Again send changes to Github repo.

Basic Project CI/CD setup completed.

initialize_model()

housing_prediciton's People

Contributors

himanshu-2012 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.