Giter Site home page Giter Site logo

laptop-prices-predictor's Introduction

Laptop Prices Predictor

  • Designed a web app that predicts the price of the laptop given the configurations.
  • Scraped the laptops data from flipkart.com using python and BeautifulSoup package
  • Developed Linear, Lasso, and Random Forest Regressors using GridsearchCV to get the best model.
  • Deployed the Machine Learning model using streamlit library in Heroku using flask

Links and Resources Used

  • PyCaret Library: https://pycaret.org/
  • Streamlit Library: https://www.streamlit.io/
  • Model Deployment Video: https://www.youtube.com/watch?v=IWWu9M-aisA
  • Model Deployment Github: https://github.com/krishnaik06/Dockers
  • Packages: pandas, numpy, sklearn, flask, streamlit, joblib
  • Web Scraping

    This is the Flipkart website comprising of different laptops. This page contains the specifications of 24 laptops. So now looking at this, we try to extract the different features of the laptops such as:

    • Description
    • Processor
    • RAM
    • Storage
    • Display
    • Warranty
    • Price
    So we extract the data from 7 pages so our dataset now consists of the information the 168 different laptops.
    Link to my article: https://towardsdatascience.com/learn-web-scraping-in-15-minutes-27e5ebb1c28e

    Feature Engineering

    We go through all the features one by one and keep adding new features. I have made the following changes and created new variables: RAM - Made columns for Ram Capacity in GB and the DDR version
    Processor - Made columns for Name of the Processor, Type of the Processor, Generation
    Operating System - Parsed the Operating System from this column and made a new column
    Storage - Made new columns for the type of Disk Drive and the capacity of the Disk Drive
    Display - Made new columns for the size of the laptop(in inches) and touchscreen
    Description - Made new columns for the company and graphic card

    Data Preprocessing

    There are a few columns which are categorical here but they actually contain numerical values.So we need to convert few categorical columns to numerical columns. These are DDR_Version,Generation,Storage_GB,Price.

    Exploratory Data Analysis


    Model Building

  • Traditional Method
  • Used scikit-learn library for the Machine Learning tasks. Applied label encoding and converted the categorical variables into numerical ones.Then I splited the data into training and test sets with a test size of 20%. I tried three different models ( Linear Regression, Random Forest Regression, XGBoost) and evaluated them using Mean Absolute Error.
  • Automated Method
  • Used the auto ML library in python called PyCaret. Compared all the regression models and selected the best model for applied hyperparameter tuning and plotted the various curves.

    Link to my article: https://towardsdatascience.com/leverage-the-power-of-pycaret-d5c3da3adb9b

    Model Deployment

    I have deployed the model using Streamlit library and flask framework on Heroku which is a Platform As A Service(PAAS)

    Web application: https://laptop-prices-predictor.herokuapp.com/

    laptop-prices-predictor's People

    Contributors

    mathangpeddi avatar

    Stargazers

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