psyphy 0.0.2__tar.gz → 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {psyphy-0.0.2 → psyphy-0.0.4}/PKG-INFO +21 -61
- psyphy-0.0.4/README.md +49 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/pyproject.toml +1 -1
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/model/likelihood.py +159 -291
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/model/wppm.py +3 -50
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_3stimulus_decision_rule.py +4 -23
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_mc_likelihood.py +69 -24
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_noise_models.py +0 -3
- psyphy-0.0.2/README.md +0 -89
- {psyphy-0.0.2 → psyphy-0.0.4}/.gitignore +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/LICENSE.md +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/__init__.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/data/__init__.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/data/dataset.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/data/io.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/inference/__init__.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/inference/base.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/inference/langevin.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/inference/laplace.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/inference/map_optimizer.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/model/__init__.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/model/base.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/model/covariance_field.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/model/noise.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/model/prior.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/posterior/__init__.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/posterior/parameter_posterior.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/posterior/posterior.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/posterior/predictive_posterior.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/trial_placement/__init__.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/trial_placement/grid.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/trial_placement/sobol.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/utils/__init__.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/src/psyphy/utils/math.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/conftest.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_basis_input_domain.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_covariance_field.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_covariance_field_single_entry_point.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_covariance_positive_definite.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_embedding_dim.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_imports.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_input_dim_validation.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_model_api.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_posteriors.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_rectangular_U.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_wishart_covariance.py +0 -0
- {psyphy-0.0.2 → psyphy-0.0.4}/tests/test_wppm_model_kwargs_guard.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: psyphy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: Adaptive Trial Placement for Psychophysical Experiments
|
|
5
5
|
Project-URL: Homepage, https://flatironinstitute.github.io/psyphy
|
|
6
6
|
Project-URL: Repository, https://github.com/flatironinstitute/psyphy
|
|
@@ -48,15 +48,14 @@ Requires-Dist: matplotlib>=3.5; extra == 'docs'
|
|
|
48
48
|
Requires-Dist: seaborn>=0.13; extra == 'docs'
|
|
49
49
|
Description-Content-Type: text/markdown
|
|
50
50
|
|
|
51
|
-

|
|
52
51
|
|
|
53
52
|
<div align="center">
|
|
54
53
|
<picture>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
<source srcset="docs/images/psyphy_logo.png" media="(prefers-color-scheme: light)"/>
|
|
55
|
+
<source srcset="docs/images/psyphy_logo.png" media="(prefers-color-scheme: dark)"/>
|
|
56
|
+
<img alt="psyphy logo" src="docs/images/psyphy_logo.png" width="200">
|
|
58
57
|
</picture>
|
|
59
|
-
<h3>
|
|
58
|
+
<h3>Active-learning-driven adaptive experimentation in psychophysics</h3>
|
|
60
59
|
</div>
|
|
61
60
|
|
|
62
61
|
|
|
@@ -67,9 +66,22 @@ Description-Content-Type: text/markdown
|
|
|
67
66
|
<a href="https://flatironinstitute.github.io/psyphy/CONTRIBUTING/">Contributing</a>
|
|
68
67
|
</h4>
|
|
69
68
|
|
|
69
|
+
## Overview
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
`psyphy` is an open-source, JAX-based framework for psychophysics research. It leverages GPU acceleration and efficient approximate inference to power Bayesian, active-learning-driven adaptive experiments.
|
|
72
|
+
|
|
73
|
+
Designed to be modular and extensible, `psyphy` accelerates research workflows and enables real-time adaptive experiments. While currently focused on human color perception, it can be adapted to other perceptual modalities.
|
|
74
|
+
|
|
75
|
+
The package is under active development, and we welcome contributions.
|
|
76
|
+
|
|
77
|
+
## Install
|
|
78
|
+
`psyphy` only supports python 3.10+. We recommend installing `psyphy` under a virtual environment. Once you've created a virtual environment for `psyphy` and activated it, you can install `psyphy` using pip:
|
|
72
79
|
|
|
80
|
+
```bash
|
|
81
|
+
pip install psyphy
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
If you're developer or want to use the latest features, you can install from GitHub using:
|
|
73
85
|
```bash
|
|
74
86
|
git clone https://flatironinstitute.github.io/psyphy.git
|
|
75
87
|
cd psyphy
|
|
@@ -82,58 +94,6 @@ pip install -e .
|
|
|
82
94
|
- Go [here](https://flatironinstitute.github.io/psyphy/examples/wppm/full_wppm_fit_example/) for a more comprehensive example visualizing a spatially varying covariance field, also explaining the underlying math. The underlying [script](https://github.com/flatironinstitute/psyphy/blob/main/docs/examples/wppm/full_wppm_fit_example.py) for this tutorial requires a GPU.
|
|
83
95
|
|
|
84
96
|
|
|
85
|
-
##
|
|
86
|
-
|
|
87
|
-
- Wishart Process Psychophysical Model (WPPM)
|
|
88
|
-
- fit to subject's data
|
|
89
|
-
- predict psychphysical thresholds
|
|
90
|
-
- optional trial placement strategy leveraging model's posterior (e.g., information gain, place next batch of trials such that model's uncertainty is maximally reduced)
|
|
91
|
-
- Priors and noise models
|
|
92
|
-
- supports cold and warm starts where warm means initialzing with parameters from previous subjects fitted parameters
|
|
93
|
-
- Noise Model:
|
|
94
|
-
- default: Gaussian
|
|
95
|
-
- supports Student's T
|
|
96
|
-
- Task likelihoods
|
|
97
|
-
- currently supports OddityTask, TwoAFC
|
|
98
|
-
- Inference engines (MAP, Langevin, Laplace)
|
|
99
|
-
- Posterior wrappers and diagnostics
|
|
100
|
-
- Trial placement strategies (grid, information gain)
|
|
101
|
-
- supports online and batchwise trial placement
|
|
102
|
-
- Experiment session orchestration
|
|
103
|
-
- reading session data and exporting next batch of trial placments
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
## Background
|
|
108
|
-
|
|
109
|
-
This package implements methods described in:
|
|
110
|
-
- [Hong et al. (2025). *Comprehensive characterization of human color discrimination thresholds*.](https://www.biorxiv.org/content/10.1101/2025.07.16.665219v1)
|
|
111
|
-
|
|
112
|
-
While the paper above used AEPsych (a Gaussian Process–based trial placer),
|
|
113
|
-
`psyphy` integrates trial placement directly with the WPPM posterior (e.g. via InfoGain/EAVC),
|
|
114
|
-
making the adaptive trial placement model-aware.
|
|
115
|
-
|
|
116
|
-
## Docs
|
|
117
|
-
|
|
118
|
-
Build and preview the documentation locally:
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
# from repo root
|
|
122
|
-
source .venv/bin/activate
|
|
123
|
-
pip install mkdocs mkdocs-material 'mkdocstrings[python]'
|
|
124
|
-
mkdocs serve
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Build the static site:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
mkdocs build
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Deploy to GitHub Pages (manual):
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
mkdocs gh-deploy --clean
|
|
137
|
-
```
|
|
97
|
+
## Contributing
|
|
138
98
|
|
|
139
|
-
For contributors, see
|
|
99
|
+
For contributors, see [`CONTRIBUTING.md`](CONTRIBUTING.md) for full doc guidelines and NumPy-style docstrings.
|
psyphy-0.0.4/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
<div align="center">
|
|
3
|
+
<picture>
|
|
4
|
+
<source srcset="docs/images/psyphy_logo.png" media="(prefers-color-scheme: light)"/>
|
|
5
|
+
<source srcset="docs/images/psyphy_logo.png" media="(prefers-color-scheme: dark)"/>
|
|
6
|
+
<img alt="psyphy logo" src="docs/images/psyphy_logo.png" width="200">
|
|
7
|
+
</picture>
|
|
8
|
+
<h3>Active-learning-driven adaptive experimentation in psychophysics</h3>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<h4 align="center">
|
|
13
|
+
<a href="https://flatironinstitute.github.io/psyphy/#install/">Installation</a> |
|
|
14
|
+
<a href="https://flatironinstitute.github.io/psyphy/reference/">Documentation</a> |
|
|
15
|
+
<a href="https://flatironinstitute.github.io/psyphy/examples/">Examples</a> |
|
|
16
|
+
<a href="https://flatironinstitute.github.io/psyphy/CONTRIBUTING/">Contributing</a>
|
|
17
|
+
</h4>
|
|
18
|
+
|
|
19
|
+
## Overview
|
|
20
|
+
|
|
21
|
+
`psyphy` is an open-source, JAX-based framework for psychophysics research. It leverages GPU acceleration and efficient approximate inference to power Bayesian, active-learning-driven adaptive experiments.
|
|
22
|
+
|
|
23
|
+
Designed to be modular and extensible, `psyphy` accelerates research workflows and enables real-time adaptive experiments. While currently focused on human color perception, it can be adapted to other perceptual modalities.
|
|
24
|
+
|
|
25
|
+
The package is under active development, and we welcome contributions.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
`psyphy` only supports python 3.10+. We recommend installing `psyphy` under a virtual environment. Once you've created a virtual environment for `psyphy` and activated it, you can install `psyphy` using pip:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install psyphy
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If you're developer or want to use the latest features, you can install from GitHub using:
|
|
35
|
+
```bash
|
|
36
|
+
git clone https://flatironinstitute.github.io/psyphy.git
|
|
37
|
+
cd psyphy
|
|
38
|
+
pip install -e .
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## [Quickstart](https://flatironinstitute.github.io/psyphy/examples/wppm/quick_start/)
|
|
43
|
+
- Go [here](https://flatironinstitute.github.io/psyphy/examples/wppm/quick_start/) for a light-weight tutorial that demonstrates how to instantiate, evaluate and fit a model quickly. You should be able to run the underlying [script](https://github.com/flatironinstitute/psyphy/blob/main/docs/examples/wppm/quick_start.py) on your CPU.
|
|
44
|
+
- Go [here](https://flatironinstitute.github.io/psyphy/examples/wppm/full_wppm_fit_example/) for a more comprehensive example visualizing a spatially varying covariance field, also explaining the underlying math. The underlying [script](https://github.com/flatironinstitute/psyphy/blob/main/docs/examples/wppm/full_wppm_fit_example.py) for this tutorial requires a GPU.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Contributing
|
|
48
|
+
|
|
49
|
+
For contributors, see [`CONTRIBUTING.md`](CONTRIBUTING.md) for full doc guidelines and NumPy-style docstrings.
|