Name | samesame JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Classifier two-sample tests and noninferiority tests. |
upload_time | 2025-09-09 00:17:41 |
maintainer | Vathy M. Kamulete |
docs_url | None |
author | Vathy M. Kamulete |
requires_python | >=3.12 |
license | GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. |
keywords |
drift detection
data monitoring
dataset shift
data validation
model validation
noninferiority tests
statistical tests
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<!-- markdownlint-disable MD041 -->
<!-- markdownlint-disable MD033 -->
# samesame
<!-- badges: start -->
[](https://pypi.org/project/samesame/)
[](https://pypi.org/project/samesame/)
[](https://vathymut.github.io/samesame/)
[](https://opensource.org/license/lgpl-3-0)
[](https://arxiv.org/abs/2107.02990)
[](https://github.com/astral-sh/uv)
[](https://github.com/astral-sh/ruff)
<!-- badges: end -->
> Same, same but different ...
`samesame` implements classifier two-sample tests (CTSTs) and as a bonus
extension, a noninferiority test (NIT).
These were either missing or implemented with some tradeoffs
(looking at you, sample-splitting) in existing libraries. And so,
`samesame` fills in the gaps :)
## Motivation
What is `samesame` good for? It is for data (model) validation, performance
monitoring, drift detection (dataset shift), statistical process control, and
so on and so forth.
Want more?
[Here you go](https://vathymut.github.io/dsos/articles/motivation.html).
This motivating example comes from the related R package
[`dsos`](https://github.com/vathymut/dsos).
## Installation
To install, run the following command:
```bash
python -m pip install samesame
```
## Usage
### Functionality
Below, you will find an overview of common modules in `samesame`.
| Function | Module |
|-------------------------------------------|------------------|
| Bayesian inference | `samesame.bayes` |
| Classifier two-sample tests (CTSTs) | `samesame.ctst` |
| Noninferiority tests (NITs) | `samesame.nit` |
### Attributes
When the method is a statistical test, `samesame` saves (stores) the results of
some potentially computationally intensive results in attributes. These
attributes, when available, can be accessed as follows.
| Attribute | Description |
|----------------|-----------------------------------------------|
| `.statistic` | The test statistic for the hypothesis. |
| `.null` | The null distribution for the hypothesis. |
| `.pvalue` | The p-value for the hypothesis. |
| `.posterior` | The posterior distribution for the hypothesis.|
| `.bayes_factor`| The bayes factor for the hypothesis. |
## Examples
To get started, please see the examples in the [docs](https://vathymut.github.io/samesame/).
## Dependencies
`samesame` has few dependencies beyond the standard library. It will
probably work with some older Python versions. It is, in short, a lightweight
dependency for most machine learning projects.`samesame` is built on top of,
and is compatible with, [scikit-learn][scikit-learn] and [numpy][numpy].
[numpy]: https://numpy.org/
[PyPI]: https://pypi.org/project/samesame
[scikit-learn]: https://scikit-learn.org/stable
Raw data
{
"_id": null,
"home_page": null,
"name": "samesame",
"maintainer": "Vathy M. Kamulete",
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": "Vathy M. Kamulete <vathymut@gmail.com>",
"keywords": "drift detection, data monitoring, dataset shift, data validation, model validation, noninferiority tests, statistical tests",
"author": "Vathy M. Kamulete",
"author_email": "Vathy M. Kamulete <vathymut@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/38/3c/4439cf1cc34e010348cdd498a63e71aafa3c6f15e357fb4423c3a6fa1b79/samesame-0.1.1.tar.gz",
"platform": null,
"description": "<!-- markdownlint-disable MD041 -->\n<!-- markdownlint-disable MD033 -->\n\n# samesame\n\n<!-- badges: start -->\n[](https://pypi.org/project/samesame/)\n[](https://pypi.org/project/samesame/)\n[](https://vathymut.github.io/samesame/)\n[](https://opensource.org/license/lgpl-3-0)\n[](https://arxiv.org/abs/2107.02990) \n[](https://github.com/astral-sh/uv)\n[](https://github.com/astral-sh/ruff)\n<!-- badges: end -->\n\n> Same, same but different ...\n\n`samesame` implements classifier two-sample tests (CTSTs) and as a bonus \nextension, a noninferiority test (NIT). \n\nThese were either missing or implemented with some tradeoffs \n(looking at you, sample-splitting) in existing libraries. And so, \n`samesame` fills in the gaps :)\n\n## Motivation\n\nWhat is `samesame` good for? It is for data (model) validation, performance\nmonitoring, drift detection (dataset shift), statistical process control, and\nso on and so forth. \n\nWant more? \n[Here you go](https://vathymut.github.io/dsos/articles/motivation.html).\nThis motivating example comes from the related R package \n[`dsos`](https://github.com/vathymut/dsos).\n\n## Installation\n\nTo install, run the following command:\n\n```bash\npython -m pip install samesame\n```\n\n## Usage\n\n### Functionality\n\nBelow, you will find an overview of common modules in `samesame`. \n\n| Function | Module |\n|-------------------------------------------|------------------|\n| Bayesian inference | `samesame.bayes` |\n| Classifier two-sample tests (CTSTs) | `samesame.ctst` |\n| Noninferiority tests (NITs) | `samesame.nit` |\n\n\n### Attributes\n\nWhen the method is a statistical test, `samesame` saves (stores) the results of\nsome potentially computationally intensive results in attributes. These\nattributes, when available, can be accessed as follows. \n\n| Attribute | Description |\n|----------------|-----------------------------------------------|\n| `.statistic` | The test statistic for the hypothesis. |\n| `.null` | The null distribution for the hypothesis. |\n| `.pvalue` | The p-value for the hypothesis. |\n| `.posterior` | The posterior distribution for the hypothesis.|\n| `.bayes_factor`| The bayes factor for the hypothesis. |\n\n## Examples\n\nTo get started, please see the examples in the [docs](https://vathymut.github.io/samesame/).\n\n## Dependencies\n\n`samesame` has few dependencies beyond the standard library. It will \nprobably work with some older Python versions. It is, in short, a lightweight\ndependency for most machine learning projects.`samesame` is built on top of,\nand is compatible with, [scikit-learn][scikit-learn] and [numpy][numpy].\n\n[numpy]: https://numpy.org/\n[PyPI]: https://pypi.org/project/samesame\n[scikit-learn]: https://scikit-learn.org/stable\n",
"bugtrack_url": null,
"license": "GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, \"this License\" refers to version 3 of the GNU Lesser General Public License, and the \"GNU GPL\" refers to version 3 of the GNU General Public License. \"The Library\" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An \"Application\" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A \"Combined Work\" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the \"Linked Version\". The \"Minimal Corresponding Source\" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The \"Corresponding Application Code\" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License \"or any later version\" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.",
"summary": "Classifier two-sample tests and noninferiority tests.",
"version": "0.1.1",
"project_urls": null,
"split_keywords": [
"drift detection",
" data monitoring",
" dataset shift",
" data validation",
" model validation",
" noninferiority tests",
" statistical tests"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "383c4439cf1cc34e010348cdd498a63e71aafa3c6f15e357fb4423c3a6fa1b79",
"md5": "5d7312173c70a6ff5a29244fcecf767d",
"sha256": "8e616f42a88f750901aa8f94b01a7aa6f370e4fd809b3c767d63b19fb17d421b"
},
"downloads": -1,
"filename": "samesame-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "5d7312173c70a6ff5a29244fcecf767d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 16176,
"upload_time": "2025-09-09T00:17:41",
"upload_time_iso_8601": "2025-09-09T00:17:41.555207Z",
"url": "https://files.pythonhosted.org/packages/38/3c/4439cf1cc34e010348cdd498a63e71aafa3c6f15e357fb4423c3a6fa1b79/samesame-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-09 00:17:41",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "samesame"
}