[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

/opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages/torch/jit/_script.py:1491: FutureWarning: `torch.jit.script` is deprecated. Please switch to `torch.compile` or `torch.export`.
  warnings.warn(

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.11 && 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-5r0k5ubl
  Running command git clone --filter=blob:none --quiet https://github.com/colinbousige/OPTIMEO.git /tmp/pip-req-build-5r0k5ubl
  Resolved https://github.com/colinbousige/OPTIMEO.git to commit 887b7506eb7456df2307bba86f1a2d339ae1b364
  Installing build dependencies ... - \ done
  Getting requirements to build wheel ... - done
  Preparing metadata (pyproject.toml) ... - done
Requirement already satisfied: ax-platform==1.3.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (1.3.1)
Requirement already satisfied: definitive_screening_design==0.5.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (0.5.0)
Requirement already satisfied: dexpy==0.12 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (0.12)
Requirement already satisfied: doepy==0.0.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (0.0.1)
Requirement already satisfied: matplotlib==3.10.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (3.10.1)
Requirement already satisfied: numpy==2.2.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (2.2.0)
Requirement already satisfied: openpyxl==3.1.5 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (3.1.5)
Requirement already satisfied: pandas==2.2.3 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (2.2.3)
Requirement already satisfied: plotly==5.24.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (5.24.0)
Requirement already satisfied: pyDOE3==1.0.4 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (1.0.4)
Requirement already satisfied: pyjanitor==0.31.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (0.31.0)
Requirement already satisfied: scikit_learn==1.6.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (1.6.1)
Requirement already satisfied: scipy==1.15.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (1.15.1)
Requirement already satisfied: seaborn==0.13.2 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (0.13.2)
Requirement already satisfied: statsmodels>=0.14.4 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (0.15.0)
Requirement already satisfied: streamlit==1.44.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (1.44.1)
Requirement already satisfied: watchdog==6.0.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (6.0.0)
Requirement already satisfied: xlrd==2.0.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (2.0.1)
Requirement already satisfied: xlsxwriter==3.2.9 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from optimeo==1.4.1) (3.2.9)
Requirement already satisfied: botorch<0.18.2dev9999,>=0.18.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (0.18.1)
Requirement already satisfied: jinja2 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.4.1) (3.1.6)
Requirement already satisfied: ipywidgets in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.4.1) (8.1.9)
Requirement already satisfied: pyre-extensions in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.4.1) (0.0.32)
Requirement already satisfied: sympy in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.4.1) (1.14.0)
Requirement already satisfied: markdown in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.4.1) (3.11)
Requirement already satisfied: graphviz in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.4.1) (0.21)
Requirement already satisfied: patsy in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from dexpy==0.12->optimeo==1.4.1) (1.0.3)
Requirement already satisfied: pyDOE in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from doepy==0.0.1->optimeo==1.4.1) (0.9.3)
Requirement already satisfied: diversipy in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from doepy==0.0.1->optimeo==1.4.1) (0.9)
Requirement already satisfied: contourpy>=1.0.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.4.1) (1.3.3)
Requirement already satisfied: cycler>=0.10 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.4.1) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.4.1) (4.66.1)
Requirement already satisfied: kiwisolver>=1.3.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.4.1) (1.5.1)
Requirement already satisfied: packaging>=20.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.4.1) (24.2)
Requirement already satisfied: pillow>=8 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.4.1) (11.3.0)
Requirement already satisfied: pyparsing>=2.3.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.4.1) (3.3.3)
Requirement already satisfied: python-dateutil>=2.7 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.4.1) (2.9.0.post0)
Requirement already satisfied: et-xmlfile in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from openpyxl==3.1.5->optimeo==1.4.1) (2.0.0)
Requirement already satisfied: pytz>=2020.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pandas==2.2.3->optimeo==1.4.1) (2026.5)
Requirement already satisfied: tzdata>=2022.7 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pandas==2.2.3->optimeo==1.4.1) (2026.5)
Requirement already satisfied: tenacity>=6.2.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from plotly==5.24.0->optimeo==1.4.1) (9.2.1)
Requirement already satisfied: natsort in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pyjanitor==0.31.0->optimeo==1.4.1) (8.4.0)
Requirement already satisfied: pandas_flavor in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pyjanitor==0.31.0->optimeo==1.4.1) (0.8.1)
Requirement already satisfied: multipledispatch in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pyjanitor==0.31.0->optimeo==1.4.1) (1.0.0)
Requirement already satisfied: joblib>=1.2.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from scikit_learn==1.6.1->optimeo==1.4.1) (1.6.0)
Requirement already satisfied: threadpoolctl>=3.1.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from scikit_learn==1.6.1->optimeo==1.4.1) (3.7.0)
Requirement already satisfied: altair<6,>=4.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (5.5.0)
Requirement already satisfied: blinker<2,>=1.0.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (1.9.0)
Requirement already satisfied: cachetools<6,>=4.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (5.5.2)
Requirement already satisfied: click<9,>=7.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (8.5.0)
Requirement already satisfied: protobuf<6,>=3.20 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (5.29.6)
Requirement already satisfied: pyarrow>=7.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (25.0.1)
Requirement already satisfied: requests<3,>=2.27 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (2.34.2)
Requirement already satisfied: toml<2,>=0.10.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (0.10.2)
Requirement already satisfied: typing-extensions<5,>=4.4.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (4.16.0)
Requirement already satisfied: gitpython!=3.1.19,<4,>=3.0.7 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (3.2.0)
Requirement already satisfied: pydeck<1,>=0.8.0b4 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (0.9.3)
Requirement already satisfied: tornado<7,>=6.0.3 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.4.1) (6.5.10)
Requirement already satisfied: jsonschema>=3.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from altair<6,>=4.0->streamlit==1.44.1->optimeo==1.4.1) (4.26.0)
Requirement already satisfied: narwhals>=1.14.2 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from altair<6,>=4.0->streamlit==1.44.1->optimeo==1.4.1) (2.26.0)
Requirement already satisfied: gpytorch>=1.15.2 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (1.15.2)
Requirement already satisfied: linear_operator>=0.6.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (0.6.1)
Requirement already satisfied: torch>=2.4 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (2.14.1)
Requirement already satisfied: ninja in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (1.13.2)
Requirement already satisfied: pymoo in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (0.6.2)
Requirement already satisfied: gitdb<5,>=4.0.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from gitpython!=3.1.19,<4,>=3.0.7->streamlit==1.44.1->optimeo==1.4.1) (4.0.12)
Requirement already satisfied: smmap<6,>=3.0.1 in /opt/hostedtoolcache/Python/3.11.17/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.4.1) (5.0.3)
Requirement already satisfied: charset_normalizer<4,>=2 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.4.1) (3.5.2)
Requirement already satisfied: idna<4,>=2.5 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.4.1) (3.20)
Requirement already satisfied: urllib3<3,>=1.26 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.4.1) (2.8.0)
Requirement already satisfied: certifi>=2023.5.7 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.4.1) (2026.7.22)
Requirement already satisfied: mpmath<=1.3,>=0.19 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from gpytorch>=1.15.2->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (1.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from jinja2->ax-platform==1.3.1->optimeo==1.4.1) (3.0.4)
Requirement already satisfied: cloudpickle>=3.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from joblib>=1.2.0->scikit_learn==1.6.1->optimeo==1.4.1) (3.1.2)
Requirement already satisfied: attrs>=22.2.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.4.1) (26.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.4.1) (2025.9.1)
Requirement already satisfied: referencing>=0.28.4 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.4.1) (0.37.0)
Requirement already satisfied: rpds-py>=0.25.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.4.1) (2026.9.1)
Requirement already satisfied: six>=1.5 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib==3.10.1->optimeo==1.4.1) (1.17.0)
Requirement already satisfied: formulaic>=1.1.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from statsmodels>=0.14.4->optimeo==1.4.1) (1.2.2)
Requirement already satisfied: interface-meta>=1.2.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from formulaic>=1.1.0->statsmodels>=0.14.4->optimeo==1.4.1) (2.0.1)
Requirement already satisfied: wrapt>=1.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from formulaic>=1.1.0->statsmodels>=0.14.4->optimeo==1.4.1) (2.5.0)
Requirement already satisfied: filelock in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (4.0.12)
Requirement already satisfied: setuptools>=77.0.3 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (79.0.1)
Requirement already satisfied: networkx>=2.5.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (3.6.1)
Requirement already satisfied: fsspec>=0.8.5 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (2026.9.0)
Requirement already satisfied: cuda-toolkit==13.0.3 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (13.0.3.0)
Requirement already satisfied: cuda-bindings<14,>=13.0.3 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (13.4.3)
Requirement already satisfied: nvidia-cudnn-cu13==9.24.0.43 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (9.24.0.43)
Requirement already satisfied: nvidia-cusparselt-cu13==0.8.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (0.8.1)
Requirement already satisfied: nvidia-nccl-cu13==2.30.7 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (2.30.7)
Requirement already satisfied: nvidia-nvshmem-cu13==3.4.5 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (3.4.5)
Requirement already satisfied: triton~=3.8.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (3.8.0)
Requirement already satisfied: nvidia-cublas==13.1.1.3.* in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (13.1.1.3)
Requirement already satisfied: nvidia-cuda-nvrtc==13.0.88.* in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (13.0.88)
Requirement already satisfied: nvidia-cuda-runtime==13.0.96.* in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (13.0.96)
Requirement already satisfied: nvidia-cufft==12.0.0.61.* in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (12.0.0.61)
Requirement already satisfied: nvidia-nvjitlink<14,>=13.0.88 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (13.4.92)
Requirement already satisfied: nvidia-cufile==1.15.1.6.* in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (1.15.1.6)
Requirement already satisfied: nvidia-cuda-cupti==13.0.85.* in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (13.0.85)
Requirement already satisfied: nvidia-curand==10.4.0.35.* in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (10.4.0.35)
Requirement already satisfied: nvidia-cusolver==12.0.4.66.* in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (12.0.4.66)
Requirement already satisfied: nvidia-cusparse==12.6.3.3.* in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (12.6.3.3)
Requirement already satisfied: nvidia-nvtx==13.0.85.* in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.3; platform_system == "Linux"->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (13.0.85)
Requirement already satisfied: cuda-pathfinder>=1.4.2 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cuda-bindings<14,>=13.0.3->torch>=2.4->botorch<0.18.2dev9999,>=0.18.1->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (1.8.3)
Requirement already satisfied: comm>=0.1.3 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (0.2.3)
Requirement already satisfied: ipython>=6.1.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (9.17.1)
Requirement already satisfied: traitlets>=4.3.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (5.16.1)
Requirement already satisfied: widgetsnbextension~=4.0.16 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (4.0.16)
Requirement already satisfied: jupyterlab_widgets~=3.0.17 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (3.0.17)
Requirement already satisfied: ipython-pygments-lexers>=1.0.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (1.1.1)
Requirement already satisfied: jedi>=0.18.2 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (0.20.0)
Requirement already satisfied: matplotlib-inline>=0.1.6 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (0.2.2)
Requirement already satisfied: pexpect>4.6 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (4.9.0)
Requirement already satisfied: prompt_toolkit<3.1.0,>=3.0.41 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (3.0.53)
Requirement already satisfied: psutil>=7 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (7.2.2)
Requirement already satisfied: pygments>=2.14.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (2.21.0)
Requirement already satisfied: stack_data>=0.6.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (0.6.3)
Requirement already satisfied: wcwidth>=0.1.4 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from prompt_toolkit<3.1.0,>=3.0.41->ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (0.9.2)
Requirement already satisfied: parso<0.9.0,>=0.8.6 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from jedi>=0.18.2->ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (0.8.7)
Requirement already satisfied: ptyprocess>=0.5 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pexpect>4.6->ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (0.7.0)
Requirement already satisfied: executing>=1.2.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (2.2.1)
Requirement already satisfied: asttokens>=2.1.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (3.0.2)
Requirement already satisfied: pure-eval in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.4.1) (0.2.4)
Requirement already satisfied: xarray in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pandas_flavor->pyjanitor==0.31.0->optimeo==1.4.1) (2026.9.0)
Requirement already satisfied: moocore>=0.1.7 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (0.3.2)
Requirement already satisfied: autograd>=1.4 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (1.9.1)
Requirement already satisfied: cma>=3.4.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (4.5.0)
Requirement already satisfied: alive_progress in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (3.3.0)
Requirement already satisfied: Deprecated in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (1.3.1)
Requirement already satisfied: cffi>=1.17.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from moocore>=0.1.7->pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (2.1.1)
Requirement already satisfied: platformdirs in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from moocore>=0.1.7->pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (4.12.4)
Requirement already satisfied: pycparser in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from cffi>=1.17.1->moocore>=0.1.7->pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (3.0)
Requirement already satisfied: about-time==4.2.1 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from alive_progress->pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (4.2.1)
Requirement already satisfied: graphemeu==0.7.2 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from alive_progress->pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.4.1) (0.7.2)
Requirement already satisfied: typing-inspect in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from pyre-extensions->ax-platform==1.3.1->optimeo==1.4.1) (0.9.0)
Requirement already satisfied: mypy-extensions>=0.3.0 in /opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages (from typing-inspect->pyre-extensions->ax-platform==1.3.1->optimeo==1.4.1) (1.1.0)

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.932
Model: OLS Adj. R-squared: 0.926
Method: Least Squares F-statistic: 154.5
Date: Thu, 08 Oct 2026 Prob (F-statistic): 1.13e-25
Time: 09:14:12 Log-Likelihood: -133.06
No. Observations: 50 AIC: 276.1
Df Residuals: 45 BIC: 285.7
Df Model: 4
Covariance Type: nonrobust
coef std err t P>|t| [0.025 0.975]
Intercept -12.7778 2.192 -5.829 0.000 -17.193 -8.363
temp 0.4601 0.020 22.683 0.000 0.419 0.501
cA 26.8548 1.994 13.468 0.000 22.839 30.871
cB 1.0501 1.886 0.557 0.580 -2.748 4.848
cC -0.6542 1.989 -0.329 0.744 -4.660 3.351
Omnibus: 3.037 Durbin-Watson: 1.942
Prob(Omnibus): 0.219 Jarque-Bera (JB): 2.313
Skew: -0.521 Prob(JB): 0.315
Kurtosis: 3.161 Cond. No. 323.


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.165e+04
Date: Thu, 08 Oct 2026 Prob (F-statistic): 7.75e-85
Time: 09:14:12 Log-Likelihood: 24.802
No. Observations: 50 AIC: -37.60
Df Residuals: 44 BIC: -26.13
Df Model: 5
Covariance Type: nonrobust
coef std err t P>|t| [0.025 0.975]
Intercept 2.6172 0.137 19.158 0.000 2.342 2.893
temp 0.1996 0.002 105.826 0.000 0.196 0.203
temp:cA 0.4995 0.003 155.776 0.000 0.493 0.506
cA 0.1901 0.191 0.993 0.326 -0.196 0.576
cB -0.5696 0.082 -6.964 0.000 -0.734 -0.405
cC -0.8114 0.086 -9.482 0.000 -0.984 -0.639
Omnibus: 0.735 Durbin-Watson: 1.902
Prob(Omnibus): 0.693 Jarque-Bera (JB): 0.816
Skew: 0.256 Prob(JB): 0.665
Kurtosis: 2.641 Cond. No. 625.


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.597514 ElasticNetCV
1 20.715602 Linear Model