Giter Club home page Giter Club logo

compatibilitystudy's Introduction

Welcome to users compatibility study ๐Ÿ‘‹

We want to study the compatibility of a user called A with another user B. I am interested in calculating similarity between 2 vectors of users traits: UserB(T1_B,T2_B) and OptUser(Rot(T1_A),-Rot(T2_A)). I used cosine_similarity as distance metric. However this similarity has to be a number between 0 and 1. Therefore cosine can't be the perfect metric (it is between -1 and 1). So, I opt to use angular distance metric. It can be used to compute a similarity function bounded between 0 and 1, inclusive.

  • angular_distance = cos^-1(cosine_similarity)/Pi
  • angular_similarity = 1- angular_distance

Given a POST request, with a body (JSON object) containing the traits of each user : [ {"t1":"value","t2":"value},{"t1":"value","t2":"value}} ]. We use this data to compute the angular similarity between two users as mentioned above.

Install

pip install -r requirements.txt

Requirements

Setting environment variables of flask :

export FLASK_ENV=development
export FLASK_APP=$(pwd)/app.py

Run project

flask run

Author

๐Ÿ‘ค Iheb KILANI

compatibilitystudy's People

Contributors

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