Skip to main content

Design Of Experiments Numerical Utility Toolkit

Project description

Design of Experiments Numerical Utility Toolkit DoENUT

Package to conveniently combine all necessary functions required to do Design of Experiments.

Code for a forthcoming paper: "DoENUT: Design of Experiments Numerical Utility Toolbox, for use in research and teaching," Ella M. Gale

Also has tutorials and examples

About

A python module to do DoE from start to finish for the main methodologies used by chemists and thus explain the methods of DoE to the interested chemist.

Design of experiments[1] (DoE) is a technique widely used in industry to optimise processes, formulations and materials or to quickly explore chemical space. The standard approach to scientific research is the one variable at a time (OVAT), where a single variable is changed and the effect measured, or the related ‘trail and error’ approach where an experimentor does repeated OVAT experiments to understand a process. DoE changes more than one variable at a time, and uses regression to fit simple models to the data, which shows up where there is interaction between factors, which can improve (synergistic) or reduce (antagonistic) outcomes. DoE is commonly used to optimise a process. The DoE method is:

  1. identify all possible factors that could affect an experiment/process deciding which ones to investigate

  2. setting up a series of experiments to fully explore the variable landscape by changing more than one variable at a time

  3. including repeat experiments to get a measure of the variance in the data

  4. using multi-variate linear regression to fit models to the data

  5. using leave one out approaches to test the predictability of the models

  6. using cost terms (often associated with the number of terms in the model

  7. choosing the best model using predictability and cost

  8. using the model to predict which area of variable space to explore next to continue to optimise.

There are several software programs to make this easy (e.g. Modde,SAS etc). For example, in optimsing a new recipie for Pringles (a type of potatoe based chip) that reduced the amount of potato flour by including rice, corn and wheat flour, Kelloggs performed a DoE with the constraints that the potato flour content must be at least 40% and that the water content must be 40%, but the amount of other flours were varied simultaneously. DoE experimentation tends to give some understanding as to what is important in a system, and has the advantage over OVAT that you know exactly how many experiments you will need to do a priori. Giving the requirement for several experiments, DoE approaches go very well with automated synthesis machines (like ChemSpeed etc), allowing for easy gathering of data.

[1] Also called ‘experimental design’ and ‘statistical experimental design’

Installation

The easiest way is via pip pip install doenut.

Alternatively, get the source and use poetry via poetry install

Getting started

As a very quick start, assuming your data is split into a pair of pandas DataFrames, one for the input data and one for the responses, the following code will create a standard model and generate some stats on how good it is.

dataset = doenut.data.ModifiableDataSet(inputs, responses)
model = doenut.models.AveragedModel(dataset)
r2, q2 = model.r2, model.q2
print(f"R2 is {r2}, Q2 is {q2}")
doenut.plot.plot_summary_of_fit_small(r2, q2)
doenut.plot.coeff_plot(model.coeffs,
                       labels=list(dataset.get().inputs.columns),
                       errors='p95',
                       normalise=True)

For a more comprehensive look, open up a workbook in Tutorials.

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

doenut-0.1.1.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

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

doenut-0.1.1-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file doenut-0.1.1.tar.gz.

File metadata

  • Download URL: doenut-0.1.1.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.1.0-13-amd64

File hashes

Hashes for doenut-0.1.1.tar.gz
Algorithm Hash digest
SHA256 24aed0aee01de4c5fe4359a1cabbbf4a216cc854926414667139402924fc0dc9
MD5 905ff93418d93d821a46df0d40f81ebf
BLAKE2b-256 b0850ad955a3561ec5466ecfc8f1bb8db8e107997a618d48bf27107734088799

See more details on using hashes here.

File details

Details for the file doenut-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: doenut-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.1.0-13-amd64

File hashes

Hashes for doenut-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d1788c611f30a7a582787ae87d9d57031138776c41ade77b88cbafa9a1c9deb
MD5 1a741e3b06cf0ad174dd6945fddd681c
BLAKE2b-256 83c01891a2ff5abfd452874fba15dd7805b9adbf73527bbc807480299795b16b

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