Skip to main content

Adaptive Trial Placement for Psychophysical Experiments

Project description

psyphy logo

Psychophysical Modeling and Adaptive Trial Placement

Installation | Documentation | Examples | Contributing

Install (editable)

git clone https://flatironinstitute.github.io/psyphy.git
cd psyphy
pip install -e .

Quickstart

  • Go here 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 on your CPU.
  • Go here for a more comprehensive example visualizing a spatially varying covariance field, also explaining the underlying math. The underlying script for this tutorial requires a GPU.

This package provides:

  • Wishart Process Psychophysical Model (WPPM)
    • fit to subject's data
    • predict psychphysical thresholds
    • 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)
  • Priors and noise models
    • supports cold and warm starts where warm means initialzing with parameters from previous subjects fitted parameters
    • Noise Model:
      • default: Gaussian
      • supports Student's T
  • Task likelihoods
    • currently supports OddityTask, TwoAFC
  • Inference engines (MAP, Langevin, Laplace)
  • Posterior wrappers and diagnostics
  • Trial placement strategies (grid, information gain)
    • supports online and batchwise trial placement
  • Experiment session orchestration
    • reading session data and exporting next batch of trial placments

Background

This package implements methods described in:

While the paper above used AEPsych (a Gaussian Process–based trial placer), psyphy integrates trial placement directly with the WPPM posterior (e.g. via InfoGain/EAVC), making the adaptive trial placement model-aware.

Docs

Build and preview the documentation locally:

# from repo root
source .venv/bin/activate
pip install mkdocs mkdocs-material 'mkdocstrings[python]'
mkdocs serve

Build the static site:

mkdocs build

Deploy to GitHub Pages (manual):

mkdocs gh-deploy --clean

For contributors, see CONTRIBUTING.md for full doc guidelines and NumPy-style docstrings.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psyphy-0.0.2.tar.gz (59.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

psyphy-0.0.2-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

Details for the file psyphy-0.0.2.tar.gz.

File metadata

  • Download URL: psyphy-0.0.2.tar.gz
  • Upload date:
  • Size: 59.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for psyphy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 02c4ad743ab459fe10f4956a4631b414e4389325f2b5495de5abf021de1d5d73
MD5 2bbbb6d1004c5195da33a4add062480f
BLAKE2b-256 19a95378b77f2e0be70a5879f5a4356e9dffaf85c2e57762cad2b52fa9093694

See more details on using hashes here.

Provenance

The following attestation bundles were made for psyphy-0.0.2.tar.gz:

Publisher: publish.yml on flatironinstitute/psyphy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file psyphy-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: psyphy-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 47.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for psyphy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb8bc60f3399bc362664dc8b638197bb24ada2f166580e2503d1352b9f5abc9f
MD5 2ff7be3b18421811698fc19d7157ac17
BLAKE2b-256 bbde5131c5152b4300ef60b7a44375871b2e1ad60609291c3d47fde0a24002cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for psyphy-0.0.2-py3-none-any.whl:

Publisher: publish.yml on flatironinstitute/psyphy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page