[1]:
# docs-warning-suppress
import logging
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning, module=r'torch\.jit\._script')
warnings.filterwarnings('ignore', category=DeprecationWarning, module=r'matplotlib\._fontconfig_pattern')
warnings.filterwarnings('ignore', message=r".*oneOf.*deprecated.*one_of.*", module=r'matplotlib\._fontconfig_pattern')
warnings.filterwarnings('ignore', message=r".*parseString.*deprecated.*parse_string.*", module=r'matplotlib\._fontconfig_pattern')
warnings.filterwarnings('ignore', message=r".*resetCache.*deprecated.*reset_cache.*", module=r'matplotlib\._fontconfig_pattern')
try:
from ax.exceptions.core import AxParameterWarning
warnings.filterwarnings('ignore', category=AxParameterWarning)
except Exception:
pass
try:
from pyparsing import PyparsingDeprecationWarning
warnings.filterwarnings('ignore', category=PyparsingDeprecationWarning)
except Exception:
pass
logging.getLogger('ax').setLevel(logging.WARNING)
logging.getLogger('ax.service.utils.instantiation').setLevel(logging.ERROR)
logging.getLogger('ax.generation_strategy.dispatch_utils').setLevel(logging.WARNING)
try:
import plotly.graph_objects as go
_orig_show = go.Figure.show
def _responsive_show(fig, *args, **kwargs):
fig.update_layout(autosize=True)
config = kwargs.get('config') or {}
config.setdefault('responsive', True)
kwargs['config'] = config
return _orig_show(fig, *args, **kwargs)
go.Figure.show = _responsive_show
except Exception:
pass
Data Analysis and Modeling#
Installation#
Create a virtual environment named .venv, activate it, then install the package:
python -m venv .venv
source .venv/bin/activate # Linux / macOS
python -m pip install --upgrade pip
python -m pip install optimeo
After that, launch the app with:
optimeo
If you are using the repo directly, you can also install from GitHub:
python -m pip install "git+https://github.com/colinbousige/OPTIMEO.git"
This notebook shows how to analyze and model experimental data once the package is installed.
[2]:
# For Google Colab
!pip install git+https://github.com/colinbousige/OPTIMEO.git
# For local development, prefer:
# uv venv .venv --python 3.10 && source .venv/bin/activate && uv sync
Collecting git+https://github.com/colinbousige/OPTIMEO.git
Cloning https://github.com/colinbousige/OPTIMEO.git to /tmp/pip-req-build-ui_mqo6m
Running command git clone --filter=blob:none --quiet https://github.com/colinbousige/OPTIMEO.git /tmp/pip-req-build-ui_mqo6m
Resolved https://github.com/colinbousige/OPTIMEO.git to commit 38523070779e9880582878feff5db525d26c3726
Installing build dependencies ... - \ done
Getting requirements to build wheel ... - done
Preparing metadata (pyproject.toml) ... - done
Requirement already satisfied: ax-platform==1.2.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (1.2.1)
Requirement already satisfied: definitive_screening_design==0.5.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (0.5.0)
Requirement already satisfied: dexpy==0.12 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (0.12)
Requirement already satisfied: doepy==0.0.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (0.0.1)
Requirement already satisfied: matplotlib==3.10.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (3.10.1)
Requirement already satisfied: numpy==2.2.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (2.2.0)
Requirement already satisfied: openpyxl==3.1.5 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (3.1.5)
Requirement already satisfied: pandas==2.2.3 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (2.2.3)
Requirement already satisfied: plotly==5.24.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (5.24.0)
Requirement already satisfied: pyDOE3==1.0.4 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (1.0.4)
Requirement already satisfied: pyjanitor==0.31.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (0.31.0)
Requirement already satisfied: scikit_learn==1.6.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (1.6.1)
Requirement already satisfied: scipy==1.15.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (1.15.1)
Requirement already satisfied: seaborn==0.13.2 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (0.13.2)
Requirement already satisfied: statsmodels>=0.14.4 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (0.14.6)
Requirement already satisfied: streamlit==1.44.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (1.44.1)
Requirement already satisfied: watchdog==6.0.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (6.0.0)
Requirement already satisfied: xlrd==2.0.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (2.0.1)
Requirement already satisfied: xlsxwriter==3.2.9 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from optimeo==1.3.2) (3.2.9)
Requirement already satisfied: botorch<0.16.2dev9999,>=0.16.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (0.16.1)
Requirement already satisfied: jinja2 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ax-platform==1.2.1->optimeo==1.3.2) (3.1.6)
Requirement already satisfied: ipywidgets in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ax-platform==1.2.1->optimeo==1.3.2) (8.1.8)
Requirement already satisfied: pyre-extensions in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ax-platform==1.2.1->optimeo==1.3.2) (0.0.32)
Requirement already satisfied: sympy in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ax-platform==1.2.1->optimeo==1.3.2) (1.14.0)
Requirement already satisfied: markdown in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ax-platform==1.2.1->optimeo==1.3.2) (3.10.2)
Requirement already satisfied: patsy in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from dexpy==0.12->optimeo==1.3.2) (1.0.2)
Requirement already satisfied: pyDOE in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from doepy==0.0.1->optimeo==1.3.2) (0.9.3)
Requirement already satisfied: diversipy in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from doepy==0.0.1->optimeo==1.3.2) (0.9)
Requirement already satisfied: contourpy>=1.0.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.3.2) (1.3.3)
Requirement already satisfied: cycler>=0.10 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.3.2) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.3.2) (4.63.0)
Requirement already satisfied: kiwisolver>=1.3.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.3.2) (1.5.0)
Requirement already satisfied: packaging>=20.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.3.2) (24.2)
Requirement already satisfied: pillow>=8 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.3.2) (11.3.0)
Requirement already satisfied: pyparsing>=2.3.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.3.2) (3.3.2)
Requirement already satisfied: python-dateutil>=2.7 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.3.2) (2.9.0.post0)
Requirement already satisfied: et-xmlfile in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from openpyxl==3.1.5->optimeo==1.3.2) (2.0.0)
Requirement already satisfied: pytz>=2020.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pandas==2.2.3->optimeo==1.3.2) (2026.2)
Requirement already satisfied: tzdata>=2022.7 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pandas==2.2.3->optimeo==1.3.2) (2026.2)
Requirement already satisfied: tenacity>=6.2.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from plotly==5.24.0->optimeo==1.3.2) (9.1.4)
Requirement already satisfied: natsort in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pyjanitor==0.31.0->optimeo==1.3.2) (8.4.0)
Requirement already satisfied: pandas_flavor in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pyjanitor==0.31.0->optimeo==1.3.2) (0.8.1)
Requirement already satisfied: multipledispatch in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pyjanitor==0.31.0->optimeo==1.3.2) (1.0.0)
Requirement already satisfied: joblib>=1.2.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from scikit_learn==1.6.1->optimeo==1.3.2) (1.5.3)
Requirement already satisfied: threadpoolctl>=3.1.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from scikit_learn==1.6.1->optimeo==1.3.2) (3.6.0)
Requirement already satisfied: altair<6,>=4.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (5.5.0)
Requirement already satisfied: blinker<2,>=1.0.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (1.9.0)
Requirement already satisfied: cachetools<6,>=4.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (5.5.2)
Requirement already satisfied: click<9,>=7.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (8.4.1)
Requirement already satisfied: protobuf<6,>=3.20 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (5.29.6)
Requirement already satisfied: pyarrow>=7.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (24.0.0)
Requirement already satisfied: requests<3,>=2.27 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (2.34.2)
Requirement already satisfied: toml<2,>=0.10.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (0.10.2)
Requirement already satisfied: typing-extensions<5,>=4.4.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (4.15.0)
Requirement already satisfied: gitpython!=3.1.19,<4,>=3.0.7 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (3.1.50)
Requirement already satisfied: pydeck<1,>=0.8.0b4 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (0.9.2)
Requirement already satisfied: tornado<7,>=6.0.3 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.3.2) (6.5.6)
Requirement already satisfied: jsonschema>=3.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from altair<6,>=4.0->streamlit==1.44.1->optimeo==1.3.2) (4.26.0)
Requirement already satisfied: narwhals>=1.14.2 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from altair<6,>=4.0->streamlit==1.44.1->optimeo==1.3.2) (2.22.0)
Requirement already satisfied: gpytorch>=1.14.2 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (1.15.2)
Requirement already satisfied: linear_operator>=0.6 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (0.6.1)
Requirement already satisfied: torch>=2.0.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (2.12.0)
Requirement already satisfied: pyro-ppl>=1.8.4 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (1.9.1)
Requirement already satisfied: pymoo in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (0.6.1.6)
Requirement already satisfied: gitdb<5,>=4.0.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from gitpython!=3.1.19,<4,>=3.0.7->streamlit==1.44.1->optimeo==1.3.2) (4.0.12)
Requirement already satisfied: smmap<6,>=3.0.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from gitdb<5,>=4.0.1->gitpython!=3.1.19,<4,>=3.0.7->streamlit==1.44.1->optimeo==1.3.2) (5.0.3)
Requirement already satisfied: charset_normalizer<4,>=2 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.3.2) (3.4.7)
Requirement already satisfied: idna<4,>=2.5 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.3.2) (3.17)
Requirement already satisfied: urllib3<3,>=1.26 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.3.2) (2.7.0)
Requirement already satisfied: certifi>=2023.5.7 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.3.2) (2026.5.20)
Requirement already satisfied: mpmath<=1.3,>=0.19 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from gpytorch>=1.14.2->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (1.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from jinja2->ax-platform==1.2.1->optimeo==1.3.2) (3.0.3)
Requirement already satisfied: attrs>=22.2.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.3.2) (26.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.3.2) (2025.9.1)
Requirement already satisfied: referencing>=0.28.4 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.3.2) (0.37.0)
Requirement already satisfied: rpds-py>=0.25.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.3.2) (2026.5.1)
Requirement already satisfied: opt-einsum>=2.3.2 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pyro-ppl>=1.8.4->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (3.4.0)
Requirement already satisfied: pyro-api>=0.1.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pyro-ppl>=1.8.4->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (0.1.2)
Requirement already satisfied: tqdm>=4.36 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pyro-ppl>=1.8.4->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (4.67.3)
Requirement already satisfied: six>=1.5 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib==3.10.1->optimeo==1.3.2) (1.17.0)
Requirement already satisfied: filelock in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (3.29.0)
Requirement already satisfied: setuptools<82 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (79.0.1)
Requirement already satisfied: networkx>=2.5.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (3.6.1)
Requirement already satisfied: fsspec>=0.8.5 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (2026.4.0)
Requirement already satisfied: cuda-toolkit==13.0.2 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-toolkit[cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (13.0.2)
Requirement already satisfied: nvidia-cublas<=13.1.1.3,>=13.1.0.3 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (13.1.1.3)
Requirement already satisfied: cuda-bindings<14,>=13.0.3 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (13.3.1)
Requirement already satisfied: nvidia-cudnn-cu13==9.20.0.48 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (9.20.0.48)
Requirement already satisfied: nvidia-cusparselt-cu13==0.8.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (0.8.1)
Requirement already satisfied: nvidia-nccl-cu13==2.29.7 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (2.29.7)
Requirement already satisfied: nvidia-nvshmem-cu13==3.4.5 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (3.4.5)
Requirement already satisfied: triton==3.7.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (3.7.0)
Requirement already satisfied: nvidia-cuda-runtime==13.0.96.* in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-toolkit[cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (13.0.96)
Requirement already satisfied: nvidia-cufft==12.0.0.61.* in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-toolkit[cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (12.0.0.61)
Requirement already satisfied: nvidia-cufile==1.15.1.6.* in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-toolkit[cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (1.15.1.6)
Requirement already satisfied: nvidia-cuda-cupti==13.0.85.* in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-toolkit[cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (13.0.85)
Requirement already satisfied: nvidia-curand==10.4.0.35.* in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-toolkit[cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (10.4.0.35)
Requirement already satisfied: nvidia-cusolver==12.0.4.66.* in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-toolkit[cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (12.0.4.66)
Requirement already satisfied: nvidia-cusparse==12.6.3.3.* in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-toolkit[cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (12.6.3.3)
Requirement already satisfied: nvidia-nvjitlink==13.0.88.* in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-toolkit[cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (13.0.88)
Requirement already satisfied: nvidia-cuda-nvrtc==13.0.88.* in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-toolkit[cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (13.0.88)
Requirement already satisfied: nvidia-nvtx==13.0.85.* in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-toolkit[cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (13.0.85)
Requirement already satisfied: cuda-pathfinder>=1.4.2 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cuda-bindings<14,>=13.0.3->torch>=2.0.1->botorch<0.16.2dev9999,>=0.16.1->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (1.5.5)
Requirement already satisfied: comm>=0.1.3 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (0.2.3)
Requirement already satisfied: ipython>=6.1.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (9.14.0)
Requirement already satisfied: traitlets>=4.3.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (5.15.0)
Requirement already satisfied: widgetsnbextension~=4.0.14 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (4.0.15)
Requirement already satisfied: jupyterlab_widgets~=3.0.15 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (3.0.16)
Requirement already satisfied: decorator>=5.1.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (5.3.1)
Requirement already satisfied: ipython-pygments-lexers>=1.0.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (1.1.1)
Requirement already satisfied: jedi>=0.18.2 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (0.20.0)
Requirement already satisfied: matplotlib-inline>=0.1.6 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (0.2.2)
Requirement already satisfied: pexpect>4.6 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (4.9.0)
Requirement already satisfied: prompt_toolkit<3.1.0,>=3.0.41 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (3.0.52)
Requirement already satisfied: psutil>=7 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (7.2.2)
Requirement already satisfied: pygments>=2.14.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (2.20.0)
Requirement already satisfied: stack_data>=0.6.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (0.6.3)
Requirement already satisfied: wcwidth in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from prompt_toolkit<3.1.0,>=3.0.41->ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (0.7.0)
Requirement already satisfied: parso<0.9.0,>=0.8.6 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from jedi>=0.18.2->ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (0.8.7)
Requirement already satisfied: ptyprocess>=0.5 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pexpect>4.6->ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (0.7.0)
Requirement already satisfied: executing>=1.2.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (2.2.1)
Requirement already satisfied: asttokens>=2.1.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (3.0.1)
Requirement already satisfied: pure-eval in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->ax-platform==1.2.1->optimeo==1.3.2) (0.2.3)
Requirement already satisfied: xarray in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pandas_flavor->pyjanitor==0.31.0->optimeo==1.3.2) (2026.4.0)
Requirement already satisfied: moocore>=0.1.7 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (0.3.1)
Requirement already satisfied: autograd>=1.4 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (1.8.0)
Requirement already satisfied: cma>=3.2.2 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (4.4.4)
Requirement already satisfied: alive_progress in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (3.3.0)
Requirement already satisfied: Deprecated in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (1.3.1)
Requirement already satisfied: cffi>=1.17.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from moocore>=0.1.7->pymoo->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (2.0.0)
Requirement already satisfied: platformdirs in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from moocore>=0.1.7->pymoo->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (4.10.0)
Requirement already satisfied: pycparser in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from cffi>=1.17.1->moocore>=0.1.7->pymoo->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (3.0)
Requirement already satisfied: about-time==4.2.1 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from alive_progress->pymoo->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (4.2.1)
Requirement already satisfied: graphemeu==0.7.2 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from alive_progress->pymoo->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (0.7.2)
Requirement already satisfied: wrapt<3,>=1.10 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from Deprecated->pymoo->botorch[pymoo]<0.16.2dev9999,>=0.16.1->ax-platform==1.2.1->optimeo==1.3.2) (2.2.1)
Requirement already satisfied: typing-inspect in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from pyre-extensions->ax-platform==1.2.1->optimeo==1.3.2) (0.9.0)
Requirement already satisfied: mypy-extensions>=0.3.0 in /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages (from typing-inspect->pyre-extensions->ax-platform==1.2.1->optimeo==1.3.2) (1.1.0)
[notice] A new release of pip is available: 26.1.1 -> 26.1.2
[notice] To update, run: pip install --upgrade pip
Let’s create an experimental_data(temp, conc) function that simulates the yield of a chemical reaction based on temperature, concentration A, concentration B and concentration C.
[3]:
import numpy as np
import pandas as pd
import plotly.graph_objects as go
import plotly.io as pio
# pio.renderers.default = "notebook"
pio.renderers.default = "notebook_connected"
def experimental_data(temp, cA, cB, cC):
"""
This function simulates experimental data based on temperature and concentrations.
The function is not based on any real experimental data and is purely for demonstration purposes.
"""
out = .2*temp + .5*temp*cA + (cA)/3 + (1 - cB)**2/2 + (3 - cC)/1.5 + np.random.normal(0, 0.2, len(temp))
return out
def generate_data(N=100):
temp = np.random.uniform(0, 100, N)
cA = np.random.uniform(0, 1, N)
cB = np.random.uniform(0, 1, N)
cC = np.random.uniform(0, 1, N)
exp_response = experimental_data(temp, cA, cB, cC)
# Create a DataFrame with the generated data
df = pd.DataFrame({'temp': temp,
'cA': cA,
'cB': cB,
'cC': cC,
'response': exp_response})
return df
df = generate_data(50)
df.to_csv('dataML.csv', index=False)
df.head()
pio.renderers['notebook_connected'].config = {'responsive': True}
Now, we will use the OPTIMEO package to analyse the data.
[4]:
from optimeo.analysis import DataAnalysis
data = pd.read_csv('dataML.csv')
factors = data.columns[:-1].tolist()
response = data.columns[-1]
analysis = DataAnalysis(data, factors, response)
analysis
[4]:
DataAnalysis(data=(50, 5), factors=['temp', 'cA', 'cB', 'cC'], response=response, model_type=None, split_size=0.2, encoders={})
First, let’s take a look at the correlation between the variables.
[5]:
analysis.plot_corr()
[6]:
analysis.plot_pairplot_plotly()
First, let’s look at a simple linear model:
[7]:
analysis.compute_linear_model()
analysis.linear_model.summary()
[7]:
| Dep. Variable: | response | R-squared: | 0.922 |
|---|---|---|---|
| Model: | OLS | Adj. R-squared: | 0.915 |
| Method: | Least Squares | F-statistic: | 133.4 |
| Date: | Tue, 02 Jun 2026 | Prob (F-statistic): | 2.40e-24 |
| Time: | 08:31:59 | Log-Likelihood: | -140.23 |
| No. Observations: | 50 | AIC: | 290.5 |
| Df Residuals: | 45 | BIC: | 300.0 |
| Df Model: | 4 | ||
| Covariance Type: | nonrobust |
| coef | std err | t | P>|t| | [0.025 | 0.975] | |
|---|---|---|---|---|---|---|
| Intercept | -8.6958 | 1.942 | -4.477 | 0.000 | -12.608 | -4.783 |
| temp | 0.4454 | 0.021 | 21.020 | 0.000 | 0.403 | 0.488 |
| cA | 24.2102 | 2.153 | 11.245 | 0.000 | 19.874 | 28.547 |
| cB | -3.2858 | 2.569 | -1.279 | 0.208 | -8.461 | 1.889 |
| cC | -0.7609 | 2.059 | -0.370 | 0.713 | -4.908 | 3.386 |
| Omnibus: | 0.299 | Durbin-Watson: | 2.334 |
|---|---|---|---|
| Prob(Omnibus): | 0.861 | Jarque-Bera (JB): | 0.253 |
| Skew: | 0.160 | Prob(JB): | 0.881 |
| Kurtosis: | 2.864 | Cond. No. | 277. |
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
[8]:
figs = analysis.plot_linear_model()
for fig in figs:
fig.show(config={'responsive': True})
The equation used for the fit is this one, you can change it if you want, e.g to add interaction terms or other polynomial terms:
[9]:
analysis.write_equation()
[9]:
'response ~ temp + cA + cB + cC '
[10]:
analysis.equation = 'response ~ temp+ temp:cA + cA + cB + cC'
analysis.compute_linear_model()
analysis.linear_model.summary()
[10]:
| Dep. Variable: | response | R-squared: | 1.000 |
|---|---|---|---|
| Model: | OLS | Adj. R-squared: | 1.000 |
| Method: | Least Squares | F-statistic: | 8.433e+04 |
| Date: | Tue, 02 Jun 2026 | Prob (F-statistic): | 2.15e-86 |
| Time: | 08:31:59 | Log-Likelihood: | 25.112 |
| No. Observations: | 50 | AIC: | -38.22 |
| Df Residuals: | 44 | BIC: | -26.75 |
| Df Model: | 5 | ||
| Covariance Type: | nonrobust |
| coef | std err | t | P>|t| | [0.025 | 0.975] | |
|---|---|---|---|---|---|---|
| Intercept | 2.3524 | 0.094 | 24.928 | 0.000 | 2.162 | 2.543 |
| temp | 0.2025 | 0.002 | 130.218 | 0.000 | 0.199 | 0.206 |
| temp:cA | 0.4935 | 0.003 | 180.965 | 0.000 | 0.488 | 0.499 |
| cA | 0.6516 | 0.153 | 4.268 | 0.000 | 0.344 | 0.959 |
| cB | -0.5270 | 0.096 | -5.467 | 0.000 | -0.721 | -0.333 |
| cC | -0.7361 | 0.076 | -9.650 | 0.000 | -0.890 | -0.582 |
| Omnibus: | 1.242 | Durbin-Watson: | 2.358 |
|---|---|---|---|
| Prob(Omnibus): | 0.537 | Jarque-Bera (JB): | 0.728 |
| Skew: | -0.287 | Prob(JB): | 0.695 |
| Kurtosis: | 3.140 | Cond. No. | 503. |
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
[11]:
figs = analysis.plot_linear_model()
for fig in figs:
fig.show(config={'responsive': True})
Now let’s make a ML model to predict the yield based on the temperature and concentrations of A, B and C.
[12]:
analysis.model_type = "ElasticNetCV"
# analysis.model_type = "RidgeCV"
# analysis.model_type = "LinearRegression"
# analysis.model_type = "RandomForest"
# analysis.model_type = "GaussianProcess"
# analysis.model_type = "GradientBoosting"
MLmodel = analysis.compute_ML_model()
figs = analysis.plot_ML_model()
for fig in figs:
fig.show(config={'responsive': True})
And if we want to make a prediction:
[13]:
new_value = pd.DataFrame({'temp': [50],
'cA': [0.35],
'cB': [0.5],
'cC': [0.5]})
analysis.predict(new_value)
[13]:
| prediction | model | |
|---|---|---|
| 0 | 19.594097 | ElasticNetCV |
| 1 | 20.709124 | Linear Model |