Giter Site home page Giter Site logo

somjit101 / facebook-friend-recommendation Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 3.0 788 KB

This is a friend recommendation systems which are used on social media platforms (e.g. Facebook, Instagram, Twitter) to suggest friends/new connections based on common interests, workplace, common friends etc. using Graph Mining techniques. Here, we are given a social graph, i.e. a graph structure where nodes are individuals on social media platforms and a directed edges (or 'links') indicates that one person 'follows' the other, or are 'friends' on social media. Now, the task is to predict newer edges to be offered as 'friend suggestions'.

Jupyter Notebook 100.00%
facebook-friend-recommendation machine-learning graph graph-algorithms graph-theory social-network social-network-analysis graph-similarity bagging-ensemble boosting-ensemble

facebook-friend-recommendation's Introduction

Facebook-Friend-Recommendation

This is a friend recommendation system used on social media platforms (e.g. Facebook, Instagram, Twitter) to suggest friends/new connections based on common interests, workplace, common friends etc. using Graph Mining techniques. Here, we are given a social graph, i.e. a graph structure where nodes are individuals on social media platforms and a directed edges (or 'links') indicates that one person 'follows' the other, or are 'friends' on social media. Now, the task is to predict newer edges to be offered as 'friend suggestions'.

Problem Statement

Given a directed social graph, have to predict missing links to recommend users. (Link Prediction in Graph)

Data Overview

Dataset Link

Taken data from facebook's recruting challenge on Kaggle Data contains two columns source and destination eac edge in graph.

  • Data columns (total 2 columns):
    • source_node int64
    • destination_node int64

Mapping the problem into supervised learning problem:

Real-world Objectives and Constraints

  • No low-latency requirement.
  • Probability of prediction is useful to recommend ighest probability links

Performance metric for supervised learning:

  • Both precision and recall is important so F1 score is good choice
  • Confusion matrix

Solution Approach

Decision Tree based approached proved to be quite effective for this problem statement and since the number of features constructed is not too large, bagging and boosting approaches could be easily employed for high precision and easy training.

Here are the details and performance metrics of the classifiers used :

Model No. of Base Learners Max Depth of Base Learners Training F1-score Testing F1-score
Random Forest 121 14 0.964 0.921
XGBoost 109 10 0.992 0.926

facebook-friend-recommendation's People

Contributors

somjit101 avatar

Stargazers

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