Git Product home page Git Product logo

kaggle-home-depot-search-relevancy's Introduction

Kaggle-Home-Depot-Search-Relevancy

Machine Learning model to rate Search Relevancy for Home Depot.

Visit:Kaggle Home Depot Product Search Relevance for more info and data file (could not upload on GitHub because of size)

Implementation Details: (using cosine similarity and linear regression)

  • Starting by reading all the input files into a pandas dataframe in python. The next step is to extract the desired information from product_descriptions and attributes file.
  • Then merge the required data from product_description and attributes file into train (dataframe in python)
  • The fields used for merging are: product_description (from product_description.csv) and MFG Brand Name, Material, Bullet1, Bullet2 and Bullet3 (from attributes.csv)
  • So, the dataframe train has has these fields: id, product_uid, product_title, search_term, relevance, product_description, MFG Brand Name, Material, bullet1, bullet2 and bullet3
  • Then, dividing the data for each row in train into three parts: one is search_term (store in one dictionary), second is concatenation of product_description, product_title, MFG Brand Name, Material, bullet1, bullet2 and bullet3 (another dictionary) and third is the relevance field (kept for linear regression, not used at this step)
  • Implementing the stemming and removing stopwords (after lowering the tokens) on all the desired fields which are to used in cosine similarity calculation.
  • After calculating the cosine similarity between search term and other fields, there are two columns with numerical data: similarity and relevance.
  • Implement Linear Regression on these two where x is similarity and y is relevance and theta values are to be calculated.
  • So, in the end when test data comes, same merging and stemming processing is performed and cosine similarity is calculated search_term and other fields.
  • Then relevance is predicted using theta values from Linear Regression algorithm.

References:

Cosine similarity:

Linear regression:

Panda dataframe functions (merge, rename, lambda):

kaggle-home-depot-search-relevancy's People

Contributors

jasminegrewal avatar

Watchers

James Cloos 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.