From b745c7c0922df19389a870990464b70493349856 Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Sat, 2 Sep 2023 10:13:54 -0400 Subject: [PATCH] docs: sampler to experimentalist at the appropriate places --- README.md | 2 +- docs/Basic Usage.ipynb | 6 +++--- docs/index.md | 2 +- docs/quickstart.md | 2 +- src/autora/experimentalist/inequality/__init__.py | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0fa723c..dbb66fd 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ You will need: - `graphviz` (optional, required for computation graph visualizations): [https://graphviz.org/download/](https://graphviz.org/download/) -Install the inequality sampler as part of the `autora` package: +Install the inequality experimentalist as part of the `autora` package: ```shell pip install -U "autora[experimentalist-inequality]" diff --git a/docs/Basic Usage.ipynb b/docs/Basic Usage.ipynb index d377b94..d2ff7b1 100644 --- a/docs/Basic Usage.ipynb +++ b/docs/Basic Usage.ipynb @@ -8,7 +8,7 @@ }, "source": [ "# Basic Usage\n", - "The inequality sampler selects $n$ experimental conditions from a pool of candidate experimental conditions $X'$. The choice is informed based on the similarity of the candidate conditions $X'$ with respect to previously examined experiment conditions $X$.\n", + "The inequality experimentalist selects $n$ experimental conditions from a pool of candidate experimental conditions $X'$. The choice is informed based on the similarity of the candidate conditions $X'$ with respect to previously examined experiment conditions $X$.\n", "We begin with importing the relevant packages." ] }, @@ -100,7 +100,7 @@ "collapsed": false }, "source": [ - "Finally, we can call the inequality sampler. Note that $X'$ is the first argument to the sampler, followed by the \"reference\" conditions $X$, and the number of samples." + "Finally, we can call the inequality experimentalist. Note that $X'$ is the first argument to the experimentalist, followed by the \"reference\" conditions $X$, and the number of samples." ] }, { @@ -128,7 +128,7 @@ "collapsed": false }, "source": [ - "The novelty sampler also works for experiments with multiple indendent variables. In the following example, we define $X$ as a single experimental condition composed of three independent factors. We choose from a pool $X'$ composed of four experimental conditons." + "The inequality experimentalist also works for experiments with multiple independent variables. In the following example, we define $X$ as a single experimental condition composed of three independent factors. We choose from a pool $X'$ composed of four experimental conditions." ] }, { diff --git a/docs/index.md b/docs/index.md index 31b666c..ec44a46 100644 --- a/docs/index.md +++ b/docs/index.md @@ -9,7 +9,7 @@ Given: - A threshold value (default = 0) that determines the maximum allowable distance for two conditions to be considered equal. - A number $n$ of conditions to sample. -The inequality sampler operates as follows: +The inequality experimentalist operates as follows: 1. For each candidate condition $\vec{x}'$ in $X'$ calculate an $inequality$ $score$: 2. Calculate the distances $d(\vec{x}, \vec{x}')$ between $\vec{x}$ and $\vec{x}'$ using the pairwise distance metric for all $\vec{x}$ in $X$. diff --git a/docs/quickstart.md b/docs/quickstart.md index 3ce10c0..8b68599 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -4,7 +4,7 @@ You will need: - `python` 3.8 or greater: [https://www.python.org/downloads/](https://www.python.org/downloads/) -*Inequality sampler* is a part of the `autora` package: +*Inequality experimentalist* is a part of the `autora` package: ```shell pip install -U autora[experimentalist-inequality] diff --git a/src/autora/experimentalist/inequality/__init__.py b/src/autora/experimentalist/inequality/__init__.py index 5d785dc..835c54d 100644 --- a/src/autora/experimentalist/inequality/__init__.py +++ b/src/autora/experimentalist/inequality/__init__.py @@ -37,7 +37,7 @@ def sample( metric: str = "euclidean", ) -> np.ndarray: """ - This inequality sampler chooses from the pool of IV conditions according to their + This inequality experimentalist chooses from the pool of IV conditions according to their inequality with respect to a reference pool reference_conditions. Two IVs are considered equal if their distance is less than the equality_distance. The IVs chosen first are feed back into reference_conditions and are included in the summed equality calculation. @@ -70,13 +70,13 @@ def sample( >>> summed_inequality_sampler([1, 2, 3], [1, 1, 1, 2, 2, 2, 3, 3]) array([[3]]) - The samplers "fills up" the reference array so the values are contributed evenly + The experimentalist "fills up" the reference array so the values are contributed evenly >>> summed_inequality_sampler([1, 1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 2, 2, 2, 2, 3, 3, 3], 3) array([[1], [3], [1]]) - The sampler samples without replacemnt! + The experimentalist samples without replacemnt! >>> summed_inequality_sampler([1, 2, 3], [1, 1, 1], 3) array([[3], [2],