Skip to main content

A language for synthesizing randomized experimental designs

Project description

SweetPea

SweetPea is a language for declaratively specifying randomized experimental designs, and a runtime for synthesizing trial sequences generated from the design specification; this prototype that is targeted at psychology and neuroscience experiments.

An experimental design is a description of experimental factors, relationships between factors, sequential constraints, and how to map those factors onto a sequence of trials. The reliability and validity of experimental results heavily relies on rigorous experimental design.

SweetPea provides a high-level interface to declaratively describe an experimental design, and a low-level synthesizer to generate unbiased sequences of trials given satisfiable constraints. SweetPea samples sequences of trials by compiling experimental designs into Boolean logic, which are then passed to a SAT-sampler. The SAT-sampler Unigen provides statistical guarantees that the solutions it finds are approximately uniformly probable in the space of all valid solutions. This means that while producing sequences of trials that are perfectly unbiased is intractable, we do the next best thing-- produce sequences that are approximately unbiased.

Disclaimer!

This project is at an early stage, and likely to change: it isn't yet ready for real-world useage. Please don't rely on any of this code!

Usage

SweetPea also depends on Docker being installed and running on your machine.

Intstall with pip:

pip install sweetpea

Example:

TODO

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

sweetpea-0.0.6.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

sweetpea-0.0.6-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file sweetpea-0.0.6.tar.gz.

File metadata

  • Download URL: sweetpea-0.0.6.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for sweetpea-0.0.6.tar.gz
Algorithm Hash digest
SHA256 b7d7a288b16ad35ea15e51e93856e3e0bc041ba6bc3382a00deb000ec12669c4
MD5 6dbe58d94da4c2210a49ae3e8256eeae
BLAKE2b-256 299bb92159fdb790a9c6159985fef01b4eaa7e090b90ea6f6743dd821a668f88

See more details on using hashes here.

File details

Details for the file sweetpea-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: sweetpea-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for sweetpea-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 57b195dd0953af5f4a738e725b4a3a0fc86b6f25b9b8a24a1b03a1fad7f91b42
MD5 bfd971cea6537c4a3fe78f30a1acecbd
BLAKE2b-256 fc9a08e17d7184b5efc3b4ceed89a9424ea416938a850e368a5062d5447632b9

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