Skip to main content

Python library for optimal psychophysics design and adaptive testing

Project description

Optimal Adaptive Psychometrics

This package provides a Rust implementation of different ways to obtain estimates for real-time adaptive psychometric testing. This includes parameter estimation and Expected Information Gain (EIG) calculations to select the next stimulus or item to present to the test taker.

Goals

  • Speed: High perfomance for small sample sizes and real-time applications ideally using SIMD instructions where possible
  • Correctness: Accurate and reliable estimates
  • Simplicity: Prioritise simplicity and readability over flexibility and scalability
  • Portability: Should work on most platforms (even those that don't allow JIT compilation)

Non-goals

  • Scalability: Not designed for big datasets (i.e., no support for GPUs or distributed computing)
  • Flexibility: Not designed for complex models or (exploratory) data analysis - you should probbaly use PyMC3 or Stan instead

(Planned) Features

  • Posterior estimation
    • using Hamiltonian Monte Carlo (HMC) using no-U-turn sampling (using the nuts-rs crate)
    • using grid approximation
    • using Variational Inference methods (maybe)
  • Expected Information Gain (EIG) calculations
    • using a Rao-Blackwellized Monte Carlo estimator (for cases where outcomes can be enumerated)
    • using a Nested Monte Carlo estimator
    • using grid approximation
    • using a Laplace approximation
    • using Variational Inference methods (maybe)

Short-term roadmap

  • Make the base psychometric model more flexible (e.g., allow for different link functions, prior distributions, snd multivariate outcomes/designs)
  • Allow better vectorisation using ndarray (will mainly be helpful when calling from Python with pyo3)
  • Implement support for Arviz for posterior diagnostics on the Python side
  • Use Enyme instead of manually deriving gradients (this currently requires building the Rust compiler from source)

Glossary

  • Outcome: A possible result or state that can arise from an experiment or random process in a probabilistic model. For example, in a psychophysics experiment studying reaction times to visual stimuli, an outcome could be the specific time (e.g., 350 milliseconds) it takes for a participant to respond to a stimulus.
  • Design: The set of deterministic inputs or predictors used in a model to explain or predict the outcome variable. These inputs are the variables that provide the framework for analyzing the relationship between them and the dependent variable in a statistical model, such as in linear regression. For example, in a psychophysics experiment, the design could include the luminance of a visual stimulus, the contrast of the stimulus, and the orientation of the stimulus.
  • Parameter: A quantity that defines a statistical model. Parameters are estimated from data and used to make inferences about the population from which the data were sampled. For example, in a psychometric model, parameters could include the threshold at which a participant can detect a stimulus, the slope of the psychometric function, and the guessing rate of the participant.

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

optimal_psychophysics-0.1.0.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

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

optimal_psychophysics-0.1.0-cp37-abi3-macosx_11_0_arm64.whl (489.5 kB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

File details

Details for the file optimal_psychophysics-0.1.0.tar.gz.

File metadata

File hashes

Hashes for optimal_psychophysics-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9371b902be1570416604370c6664b318d04a897b889df988be3fa01b7a8d6950
MD5 4ffecb43d4c0c13699d6fcb072f6bd90
BLAKE2b-256 852aedf1cec4c3d1ddc175775f1ba64656da3bddd9349a5ceb7a517ff277cc8c

See more details on using hashes here.

File details

Details for the file optimal_psychophysics-0.1.0-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for optimal_psychophysics-0.1.0-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 acc7571f188905d5ffb3615b87bcc42893e9bf06f5e7382f9d91583d669c29e0
MD5 83a994f8fe0c588d40025150136c9e75
BLAKE2b-256 e3644ac6e75272cd2e80633a6f1fd7179d199445edf2f74f857859e059fcab9b

See more details on using hashes here.

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