{"id":13717244,"url":"https://github.com/josipd/torch-two-sample","last_synced_at":"2025-05-07T07:30:32.622Z","repository":{"id":41394843,"uuid":"104855318","full_name":"josipd/torch-two-sample","owner":"josipd","description":"A PyTorch library for two-sample tests","archived":false,"fork":false,"pushed_at":"2023-05-27T01:04:12.000Z","size":84,"stargazers_count":237,"open_issues_count":8,"forks_count":33,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-14T05:33:58.559Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/josipd.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-26T08:07:20.000Z","updated_at":"2024-10-30T04:17:09.000Z","dependencies_parsed_at":"2024-11-14T05:31:17.136Z","dependency_job_id":"165e540b-446b-4ff3-9a48-1f49d860f540","html_url":"https://github.com/josipd/torch-two-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josipd%2Ftorch-two-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josipd%2Ftorch-two-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josipd%2Ftorch-two-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josipd%2Ftorch-two-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josipd","download_url":"https://codeload.github.com/josipd/torch-two-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252833387,"owners_count":21811174,"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":[],"created_at":"2024-08-03T00:01:19.781Z","updated_at":"2025-05-07T07:30:32.324Z","avatar_url":"https://github.com/josipd.png","language":"Jupyter Notebook","funding_links":[],"categories":["Pytorch \u0026 related libraries｜Pytorch \u0026 相关库","Pytorch \u0026 related libraries"],"sub_categories":["Other libraries｜其他库:","Other libraries:"],"readme":"# `torch-two-sample`\n[![Documentation Status](https://readthedocs.org/projects/torch-two-sample/badge/?version=latest)](https://torch-two-sample.readthedocs.io/en/latest/)\n[![Build Status](https://travis-ci.org/josipd/torch-two-sample.svg?branch=master)](https://travis-ci.org/josipd/torch-two-sample)\n\nA PyTorch library for differentiable two-sample tests\n\n### Description\n\nThis package implements a total of six two sample tests:\n\n  * The classical Friedman-Rafsky test *[FR79]*.\n  * The classical k-nearest neighbours (kNN) test *[FR83]*.\n  * The differentiable Friedman-Rafsky test *[DK17]*.\n  * The differentiable k-nearest neighbours (kNN) test *[DK17]*.\n  * The maximum mean discrepancy (MMD) test *[GBR+12]*.\n  * The energy test *[SzekelyR13]*.\n\nPlease refer to the [documentation](https://torch_two_sample.readthedocs.io)\nfor more information about the project.\nYou can also have a look at the following [notebook](notebooks/mnist.ipynb)\nthat showcases how to use the code to train a generative model on MNIST.\n\n### Installation\n\nAfter installing PyTorch, you can install the package with:\n\n```\npython setup.py install\n```\n\n### Testing\n\nTo run the tests you simply have to run:\n\n```\npython setup.py test\n```\n\nNote that you will need to have [Shogun](http://www.shogun-toolbox.org)\ninstalled for one of the test cases.\n\n\n### Bibliography\n\n  * *[DK17]* J. Djolonga and A. Krause. Learning Implicit Generative Models Using Differentiable Graph Tests. ArXiv e-prints, September 2017. arXiv:1709.01006.\n  * *[FR79]* Jerome H Friedman and Lawrence C Rafsky. Multivariate generalizations of the wald-wolfowitz and smirnov two-sample tests. Annals of Statistics, pages 697–717, 1979.\n  * *[FR83]* Jerome H Friedman and Lawrence C Rafsky. Graph-theoretic measures of multivariate association and prediction. Annals of Statistics, pages 377–391, 1983.\n  * *[GBR+12]* Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test. Journal of Machine Learning Research, 13(Mar):723–773, 2012.\n  * *[SST+12]* Kevin Swersky, Ilya Sutskever, Daniel Tarlow, Richard S Zemel, Ruslan R Salakhutdinov, and Ryan P Adams. Cardinality restricted boltzmann machines. In Advances in Neural Information Processing Systems (NIPS), 3293–3301. 2012.\n  * *[SzekelyR13]* Gábor J Székely and Maria L Rizzo. Energy statistics: a class of statistics based on distances. Journal of Statistical Planning and Inference, 143(8):1249–1272, 2013.\n  * *[TSZ+12]* Daniel Tarlow, Kevin Swersky, Richard S Zemel, Ryan Prescott Adams, and Brendan J Frey. Fast exact inference for recursive cardinality models. Uncertainty in Artificial Intelligence (UAI), 2012.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosipd%2Ftorch-two-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosipd%2Ftorch-two-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosipd%2Ftorch-two-sample/lists"}