Giter Site home page Giter Site logo

mindis / cs-ranking Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kiudee/cs-ranking

0.0 3.0 0.0 23.18 MB

Context-sensitive ranking and choice in Python with Tensorflow

Home Page: https://kiudee.github.io/cs-ranking/

License: Apache License 2.0

Python 8.12% Jupyter Notebook 91.85% Shell 0.03%

cs-ranking's Introduction

Build Status Coverage Binder

CS-Rank

CS-Rank is a Python package for context-sensitive ranking and choice algorithms.

We implement the following new object ranking/choice architectures:

  • FATE (First aggregate then evaluate)
  • FETA (First evaluate then aggregate)

In addition, we also implement these algorithms for choice functions:

  • RankNetChoiceFunction
  • GeneralizedLinearModel
  • PairwiseSVMChoiceFunction

These are the state-of-the-art approaches implemented for the discrete choice setting:

  • GeneralizedNestedLogitModel
  • MixedLogitModel
  • NestedLogitModel
  • PairedCombinatorialLogit
  • RankNetDiscreteChoiceFunction
  • PairwiseSVMDiscreteChoiceFunction

Check out our interactive notebooks to quickly find out what our package can do.

Getting started

As a simple "Hello World!"-example we will try to learn the Pareto problem:

import csrank as cs
from csrank import ChoiceDatasetGenerator
gen = ChoiceDatasetGenerator(dataset_type='pareto',
                                n_objects=30,
                                n_features=2)
X_train, Y_train, X_test, Y_test = gen.get_single_train_test_split()                     

All our learning algorithms are implemented using the scikit-learn estimator API. Fitting our FATENet architecture is as simple as calling the fit method:

fate = cs.FATEChoiceFunction(n_object_features=2)
fate.fit(X_train, Y_train) 

Predictions can then be obtained using:

fate.predict(X_test)

Installation

The latest release version of CS-Rank can be installed from Github as follows:

pip install git+https://github.com/kiudee/cs-ranking.git

Another option is to clone the repository and install CS-Rank using:

python setup.py install

Dependencies

CS-Rank depends on Tensorflow, Keras, NumPy, SciPy, matplotlib, scikit-learn, scikit-optimize, joblib and tqdm. For data processing and generation you will also need PyGMO, H5Py and pandas.

Citing CS-Rank

You can cite our arXiv paper:

@ARTICLE{csrank2018,
       author = {{Pfannschmidt}, K. and {Gupta}, P. and {H{\"u}llermeier}, E.},
        title = "{Deep architectures for learning context-dependent ranking functions}",
      journal = {ArXiv e-prints},
archivePrefix = "arXiv",
       eprint = {1803.05796},
 primaryClass = "stat.ML",
     keywords = {Statistics - Machine Learning, Computer Science - Information Retrieval, Computer Science - Learning, Computer Science - Neural and Evolutionary Computing},
         year = 2018,
        month = mar,
       adsurl = {http://adsabs.harvard.edu/abs/2018arXiv180305796P},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

License

Apache License, Version 2.0

cs-ranking's People

Contributors

kiudee avatar prithagupta avatar

Watchers

Mindaugas Zickus avatar  avatar paper2code - bot 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.