{"id":13856851,"url":"https://github.com/kiudee/cs-ranking","last_synced_at":"2025-11-03T04:03:04.153Z","repository":{"id":37677511,"uuid":"120945944","full_name":"kiudee/cs-ranking","owner":"kiudee","description":"Context-sensitive ranking and choice in Python with PyTorch","archived":false,"fork":false,"pushed_at":"2023-02-11T00:36:22.000Z","size":29992,"stargazers_count":66,"open_issues_count":33,"forks_count":15,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-14T12:54:30.569Z","etag":null,"topics":["choice-model","context-aware","deep-learning","discrete-choice","learning-to-rank","machine-learning","neural-networks","object-ranking","pytorch","ranking","tensorflow"],"latest_commit_sha":null,"homepage":"https://cs-ranking.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiudee.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-09T19:21:15.000Z","updated_at":"2024-08-14T19:48:19.000Z","dependencies_parsed_at":"2023-01-25T09:15:37.063Z","dependency_job_id":null,"html_url":"https://github.com/kiudee/cs-ranking","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiudee%2Fcs-ranking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiudee%2Fcs-ranking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiudee%2Fcs-ranking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiudee%2Fcs-ranking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiudee","download_url":"https://codeload.github.com/kiudee/cs-ranking/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225912327,"owners_count":17544148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["choice-model","context-aware","deep-learning","discrete-choice","learning-to-rank","machine-learning","neural-networks","object-ranking","pytorch","ranking","tensorflow"],"created_at":"2024-08-05T03:01:15.999Z","updated_at":"2025-11-03T04:03:04.067Z","avatar_url":"https://github.com/kiudee.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"|Coverage| |Binder|\n\n****\nNOTE\n****\n\nThis library has recently been migrated from tensorflow to PyTorch. The 2.0\nversion marks a breaking change. Some of the previous functionality is now\nunavailable and some classes behave differently. You can use the latest 1.x\nrelease if you are looking for the tensorflow based estimators.\n\n*******\nCS-Rank\n*******\n\nCS-Rank is a Python package for context-sensitive ranking and choice\nalgorithms.\n\nWe implement the following new object ranking/choice architectures:\n\n* FATE (First aggregate then evaluate)\n* FETA (First evaluate then aggregate)\n\nIn addition, we also implement these algorithms for choice functions:\n\n* RankNetChoiceFunction\n* GeneralizedLinearModel\n* PairwiseSVMChoiceFunction\n\nThese are the state-of-the-art approaches implemented for the discrete choice\nsetting:\n\n* GeneralizedNestedLogitModel\n* MixedLogitModel\n* NestedLogitModel\n* PairedCombinatorialLogit\n* RankNetDiscreteChoiceFunction\n* PairwiseSVMDiscreteChoiceFunction\n\n\nGetting started\n===============\nAs a simple \"Hello World!\"-example we will try to learn the Pareto problem:\n\n.. code-block:: python\n\n   import csrank as cs\n   from csrank import ChoiceDatasetGenerator\n   gen = ChoiceDatasetGenerator(dataset_type='pareto',\n                                   n_objects=30,\n                                   n_features=2)\n   X_train, Y_train, X_test, Y_test = gen.get_single_train_test_split()\n\nAll our learning algorithms are implemented using the scikit-learn estimator\nAPI. Fitting our FATENet architecture is as simple as calling the ``fit``\nmethod:\n\n.. code-block:: python\n\n   fate = cs.FATEChoiceFunction()\n   fate.fit(X_train, Y_train)\n\nPredictions can then be obtained using:\n\n.. code-block:: python\n\n   fate.predict(X_test)\n\n\nInstallation\n------------\nThe latest release version of CS-Rank can be installed from Github as follows::\n\n   pip install git+https://github.com/kiudee/cs-ranking.git\n\nAnother option is to clone the repository and install CS-Rank using::\n\n   python setup.py install\n\n\nDependencies\n------------\nCS-Rank depends on PyTorch, skorch, NumPy, SciPy, matplotlib, scikit-learn,\njoblib and tqdm. For data processing and generation you will\nalso need PyGMO, H5Py and pandas.\n\nCiting CS-Rank\n----------------\nYou can cite our `arXiv papers`_::\n\n\n\n  @article{csrank2019,\n    author    = {Karlson Pfannschmidt and\n                 Pritha Gupta and\n                 Eyke H{\\\"{u}}llermeier},\n    title     = {Learning Choice Functions: Concepts and Architectures },\n    journal   = {CoRR},\n    volume    = {abs/1901.10860},\n    year      = {2019}\n  }\n\n  @article{csrank2018,\n    author    = {Karlson Pfannschmidt and\n                 Pritha Gupta and\n                 Eyke H{\\\"{u}}llermeier},\n    title     = {Deep architectures for learning context-dependent ranking functions},\n    journal   = {CoRR},\n    volume    = {abs/1803.05796},\n    year      = {2018}\n  }\n\nLicense\n--------\n`Apache License, Version 2.0 \u003chttps://github.com/kiudee/cs-ranking/blob/master/LICENSE\u003e`_\n\n.. |Binder| image:: https://mybinder.org/badge_logo.svg\n   :target: https://mybinder.org/v2/gh/kiudee/cs-ranking/master?filepath=docs%2Fnotebooks\n\n.. |Coverage| image:: https://codecov.io/gh/kiudee/cs-ranking/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/kiudee/cs-ranking\n\n..\n  |Build Status| image:: https://img.shields.io/github/workflow/status/kiudee/cs-ranking/tests\n  :target: https://github.com/kiudee/cs-ranking/actions\n  :alt: GitHub Workflow Status\n\n\n.. _interactive notebooks: https://mybinder.org/v2/gh/kiudee/cs-ranking/master?filepath=docs%2Fnotebooks\n.. _arXiv papers: https://arxiv.org/search/cs?searchtype=author\u0026query=Pfannschmidt%2C+K\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiudee%2Fcs-ranking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiudee%2Fcs-ranking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiudee%2Fcs-ranking/lists"}