Giter VIP home page Giter VIP logo

antidote-data-framework's Introduction

antidote-data-framework

This is the Python implementation of the antidote data generation framework introduced in "Fighting Fire with Fire: Using Antidote Data to Improve Polarization and Fairness of Recommender Systems", WSDM 2019

The current implementation generates antidote data for matrix factorization based recommender systems. The framework consists of the following components:

  • ("MF.py") provides an abstraction of a recommender system. An instance of this class will be sent to the optimization algorithm that generates the antidote data. Two algorithms are implemented for solving the matrix factorization: regularized alternating least squares and a Python implementation of LMaFit (http://lmafit.blogs.rice.edu/).

  • ("utilities.py") contains the social objectives for which we want to generate antidote data. The utilities that are implemented in the current version are: polarization, individual fairness, and group fairness. Detailed description of each social objective is provided in the paper. A new objective functions can be easily added to this file as a new class. Each class has two main methods: evaluate() defines the social property as a function of partially observed ratings and/or estimated ratings; gradient() provides the gradient of the objective function with respect to the estimated ratings.

  • ("optimization.py") contains different optimization algorithms for generating antidote data. gradient_descent_LS() is the implementation of the projected gradient descent algorithm presented as Algorithm 1 in the paper. The optimal step size is selected via a grid search.

  • ("minimze_polarization.py") provides an example of how to use the framework. A subset of 300 users and 500 movies from the MovieLens 1M dataset is selected and antidote data is generated to minimize the average user polarization per movie. The resulting plots show the effect of antidote data on the rating estimations. More details about how to set the parameters of the optimization framework are provided in the code.

We have used the MovieLens 1M Dataset: F. Maxwell Harper and Joseph A. Konstan. 2015. The MovieLens Datasets: History and Context. ACM Transactions on Interactive Intelligent Systems (TiiS) 5, 4, Article 19 (December 2015), 19 pages. DOI=http://dx.doi.org/10.1145/2827872

For reproducing the results you can download the dataset from (https://grouplens.org/datasets/movielens/) and place it in the 'Data/' folder.

antidote-data-framework's People

Contributors

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