Skip to content

Commit 948ebcc

Browse files
committed
Added README and code of conduct.
1 parent 15b8cf8 commit 948ebcc

4 files changed

Lines changed: 315 additions & 0 deletions

File tree

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
^\.Rproj\.user$
33
^LICENSE\.md$
44
^data-raw$
5+
^README\.Rmd$
6+
^CODE_OF_CONDUCT\.md$

CODE_OF_CONDUCT.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at aymeric.stamm@cnrs.fr.
63+
All complaints will be reviewed and investigated promptly and fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Correction
74+
75+
**Community Impact**: Use of inappropriate language or other behavior deemed
76+
unprofessional or unwelcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series of
85+
actions.
86+
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or permanent
92+
ban.
93+
94+
### 3. Temporary Ban
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent Ban
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent ban from any sort of public interaction within the
112+
community.
113+
114+
## Attribution
115+
116+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117+
version 2.1, available at
118+
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
119+
120+
Community Impact Guidelines were inspired by
121+
[Mozilla's code of conduct enforcement ladder][https://github.com/mozilla/inclusion].
122+
123+
For answers to common questions about this code of conduct, see the FAQ at
124+
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.
125+
126+
[homepage]: https://www.contributor-covenant.org

README.Rmd

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
output: github_document
3+
---
4+
5+
<!-- README.md is generated from README.Rmd. Please edit that file -->
6+
7+
```{r, include = FALSE}
8+
knitr::opts_chunk$set(
9+
collapse = TRUE,
10+
comment = "#>",
11+
fig.path = "man/figures/README-",
12+
out.width = "100%"
13+
)
14+
```
15+
16+
# inphr
17+
18+
<!-- badges: start -->
19+
<!-- badges: end -->
20+
21+
The goal of {inphr} is to provide a set of functions for performing null
22+
hypothesis testing on samples of persistence diagrams using the theory of
23+
permutations. Currently, only two-sample testing is implemented. Inputs can be
24+
either samples of persistence diagrams themselves or vectorizations. In the
25+
former case, they are embedded in a metric space using either the Bottleneck or
26+
Wasserstein distance. In the former case, persistence data becomes functional
27+
data and inference is performed using tools available in the
28+
[{fdatest}](https://permaverse.github.io/fdatest/) package.
29+
30+
## Installation
31+
32+
You can install the development version of inphr from
33+
[GitHub](https://github.com/) with:
34+
35+
``` r
36+
# install.packages("pak")
37+
pak::pak("tdaverse/inphr")
38+
```
39+
40+
## Example
41+
42+
Let us start by loading the package:
43+
44+
```{r}
45+
library(inphr)
46+
```
47+
48+
The package contains three sets of persistence diagrams, which can be used for
49+
testing. They are available in the package as `trefoils1`, `trefoils2`, and
50+
`archspirals`. The first two sets contain persistence diagrams computed from
51+
noisy samples of trefoil knots, while the third set contains persistence
52+
diagrams computed from noisy samples of 2-armed Archimedean spirals. Each set
53+
contains 24 persistence diagrams, each computed from a sample of 120 points
54+
sampled from the respective shape, with Gaussian noise added (standard
55+
deviation = 0.05). The persistence diagrams were computed using the
56+
[`TDA::ripsDiag()`] function with a maximum scale of 6 and up to dimension 2.
57+
You can use the `two_sample_test()` function to perform a two-sample test on
58+
these persistence diagrams. For example, to test whether the first 5
59+
persistence diagrams from the first set are significantly different from the
60+
first 5 persistence diagrams from the second set, you can run:
61+
62+
```{r}
63+
two_sample_test(trefoils1[1:5], trefoils2[1:5], B = 100L)
64+
```
65+
66+
To test whether the first 5 persistence diagrams from the first set are
67+
significantly different from the first 5 persistence diagrams from the third
68+
set, you can run:
69+
70+
```{r}
71+
two_sample_test(trefoils1[1:5], archspirals[1:5], B = 100L)
72+
```
73+
74+
## Contributions
75+
76+
Contributions are welcome! Please feel free to open an issue or a pull request
77+
if you have any suggestions or improvements. The package is still in its early
78+
stages, so any feedback is appreciated.
79+
80+
### Code of Conduct
81+
82+
Please note that the {inphr} project is released with a [Contributor Code of
83+
Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By
84+
contributing to this project, you agree to abide by its terms.
85+
86+
### Acknowledgements
87+
88+
This project was funded by [an ISC grant from the R
89+
Consortium](https://r-consortium.org/all-projects/2024-group-1.html#modular-interoperable-and-extensible-topological-data-analysis-in-r)
90+
and done in coordination with Jason Cory Brunson and with guidance from Bertrand
91+
Michel and Paul Rosen. It builds upon conversations with Mathieu Carrière and
92+
Vincent Rouvreau who are among the authors of the
93+
[GUDHI](https://gudhi.inria.fr) library. Package development also benefited
94+
from the support of colleagues at the [Department of Mathematics Jean
95+
Leray](https://www.math.sciences.univ-nantes.fr) and the use of equipment at
96+
[Nantes University](https://english.univ-nantes.fr).

README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
2+
<!-- README.md is generated from README.Rmd. Please edit that file -->
3+
4+
# inphr
5+
6+
<!-- badges: start -->
7+
8+
<!-- badges: end -->
9+
10+
The goal of {inphr} is to provide a set of functions for performing null
11+
hypothesis testing on samples of persistence diagrams using the theory
12+
of permutations. Currently, only two-sample testing is implemented.
13+
Inputs can be either samples of persistence diagrams themselves or
14+
vectorizations. In the former case, they are embedded in a metric space
15+
using either the Bottleneck or Wasserstein distance. In the former case,
16+
persistence data becomes functional data and inference is performed
17+
using tools available in the
18+
[{fdatest}](https://permaverse.github.io/fdatest/) package.
19+
20+
## Installation
21+
22+
You can install the development version of inphr from
23+
[GitHub](https://github.com/) with:
24+
25+
``` r
26+
# install.packages("pak")
27+
pak::pak("tdaverse/inphr")
28+
```
29+
30+
## Example
31+
32+
Let us start by loading the package:
33+
34+
``` r
35+
library(inphr)
36+
```
37+
38+
The package contains three sets of persistence diagrams, which can be
39+
used for testing. They are available in the package as `trefoils1`,
40+
`trefoils2`, and `archspirals`. The first two sets contain persistence
41+
diagrams computed from noisy samples of trefoil knots, while the third
42+
set contains persistence diagrams computed from noisy samples of 2-armed
43+
Archimedean spirals. Each set contains 24 persistence diagrams, each
44+
computed from a sample of 120 points sampled from the respective shape,
45+
with Gaussian noise added (standard deviation = 0.05). The persistence
46+
diagrams were computed using the \[`TDA::ripsDiag()`\] function with a
47+
maximum scale of 6 and up to dimension 2. You can use the
48+
`two_sample_test()` function to perform a two-sample test on these
49+
persistence diagrams. For example, to test whether the first 5
50+
persistence diagrams from the first set are significantly different from
51+
the first 5 persistence diagrams from the second set, you can run:
52+
53+
``` r
54+
two_sample_test(trefoils1[1:5], trefoils2[1:5], B = 100L)
55+
#> [1] 0.9782132
56+
```
57+
58+
To test whether the first 5 persistence diagrams from the first set are
59+
significantly different from the first 5 persistence diagrams from the
60+
third set, you can run:
61+
62+
``` r
63+
two_sample_test(trefoils1[1:5], archspirals[1:5], B = 100L)
64+
#> [1] 0.008047755
65+
```
66+
67+
## Contributions
68+
69+
Contributions are welcome! Please feel free to open an issue or a pull
70+
request if you have any suggestions or improvements. The package is
71+
still in its early stages, so any feedback is appreciated.
72+
73+
### Code of Conduct
74+
75+
Please note that the {inphr} project is released with a [Contributor
76+
Code of
77+
Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html).
78+
By contributing to this project, you agree to abide by its terms.
79+
80+
### Acknowledgements
81+
82+
This project was funded by [an ISC grant from the R
83+
Consortium](https://r-consortium.org/all-projects/2024-group-1.html#modular-interoperable-and-extensible-topological-data-analysis-in-r)
84+
and done in coordination with Jason Cory Brunson and with guidance from
85+
Bertrand Michel and Paul Rosen. It builds upon conversations with
86+
Mathieu Carrière and Vincent Rouvreau who are among the authors of the
87+
[GUDHI](https://gudhi.inria.fr) library. Package development also
88+
benefited from the support of colleagues at the [Department of
89+
Mathematics Jean Leray](https://www.math.sciences.univ-nantes.fr) and
90+
the use of equipment at [Nantes
91+
University](https://english.univ-nantes.fr).

0 commit comments

Comments
 (0)