[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-wrw70ygx
  Running command git clone --filter=blob:none --quiet https://github.com/colinbousige/OPTIMEO.git /tmp/pip-req-build-wrw70ygx
  Resolved https://github.com/colinbousige/OPTIMEO.git to commit f6d79cb9ae212f0cc9d2e01c204209ab9fcd4834
  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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (2.22.1)
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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (3.18)
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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (4.68.1)
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.3) (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.3) (3.29.1)
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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (9.14.1)
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.3) (5.15.1)
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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (0.8.1)
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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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.3) (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]:
OLS Regression Results
Dep. Variable: response R-squared: 0.952
Model: OLS Adj. R-squared: 0.947
Method: Least Squares F-statistic: 221.3
Date: Mon, 08 Jun 2026 Prob (F-statistic): 5.71e-29
Time: 10:18:04 Log-Likelihood: -132.44
No. Observations: 50 AIC: 274.9
Df Residuals: 45 BIC: 284.4
Df Model: 4
Covariance Type: nonrobust
coef std err t P>|t| [0.025 0.975]
Intercept -12.0026 2.005 -5.987 0.000 -16.041 -7.965
temp 0.4364 0.019 23.000 0.000 0.398 0.475
cA 30.2790 1.829 16.556 0.000 26.595 33.963
cB -1.9838 2.263 -0.877 0.385 -6.542 2.575
cC 1.3955 1.883 0.741 0.463 -2.397 5.188
Omnibus: 7.805 Durbin-Watson: 1.532
Prob(Omnibus): 0.020 Jarque-Bera (JB): 6.935
Skew: -0.867 Prob(JB): 0.0312
Kurtosis: 3.565 Cond. No. 360.


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]:
OLS Regression Results
Dep. Variable: response R-squared: 1.000
Model: OLS Adj. R-squared: 1.000
Method: Least Squares F-statistic: 7.398e+04
Date: Mon, 08 Jun 2026 Prob (F-statistic): 3.82e-85
Time: 10:18:04 Log-Likelihood: 17.767
No. Observations: 50 AIC: -23.53
Df Residuals: 44 BIC: -12.06
Df Model: 5
Covariance Type: nonrobust
coef std err t P>|t| [0.025 0.975]
Intercept 2.2578 0.147 15.401 0.000 1.962 2.553
temp 0.2012 0.002 100.517 0.000 0.197 0.205
temp:cA 0.4971 0.004 133.629 0.000 0.490 0.505
cA 0.5773 0.240 2.401 0.021 0.093 1.062
cB -0.4749 0.114 -4.165 0.000 -0.705 -0.245
cC -0.6009 0.096 -6.286 0.000 -0.794 -0.408
Omnibus: 0.572 Durbin-Watson: 1.976
Prob(Omnibus): 0.751 Jarque-Bera (JB): 0.664
Skew: 0.050 Prob(JB): 0.717
Kurtosis: 2.444 Cond. No. 737.


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 21.150542 ElasticNetCV
1 20.679480 Linear Model