[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.18/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-w094net5
  Running command git clone --filter=blob:none --quiet https://github.com/colinbousige/OPTIMEO.git /tmp/pip-req-build-w094net5
  Resolved https://github.com/colinbousige/OPTIMEO.git to commit b188a1404169852cc7f6904e45228e60bbd94c8a
  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.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (1.3.1)
Requirement already satisfied: definitive_screening_design==0.5.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (0.5.0)
Requirement already satisfied: dexpy==0.12 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (0.12)
Requirement already satisfied: doepy==0.0.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (0.0.1)
Requirement already satisfied: matplotlib==3.10.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (3.10.1)
Requirement already satisfied: numpy==2.2.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (2.2.0)
Requirement already satisfied: openpyxl==3.1.5 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (3.1.5)
Requirement already satisfied: pandas==2.2.3 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (2.2.3)
Requirement already satisfied: plotly==5.24.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (5.24.0)
Requirement already satisfied: pyDOE3==1.0.4 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (1.0.4)
Requirement already satisfied: pyjanitor==0.31.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (0.31.0)
Requirement already satisfied: scikit_learn==1.6.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (1.6.1)
Requirement already satisfied: scipy==1.15.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (1.15.1)
Requirement already satisfied: seaborn==0.13.2 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (0.13.2)
Requirement already satisfied: statsmodels>=0.14.4 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (0.15.0)
Requirement already satisfied: streamlit==1.44.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (1.44.1)
Requirement already satisfied: watchdog==6.0.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (6.0.0)
Requirement already satisfied: xlrd==2.0.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (2.0.1)
Requirement already satisfied: xlsxwriter==3.2.9 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from optimeo==1.5.0) (3.2.9)
Requirement already satisfied: botorch<0.18.2dev9999,>=0.18.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.5.0) (0.18.1)
Requirement already satisfied: jinja2 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.5.0) (3.1.6)
Requirement already satisfied: ipywidgets in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.5.0) (8.1.9)
Requirement already satisfied: pyre-extensions in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.5.0) (0.0.32)
Requirement already satisfied: sympy in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.5.0) (1.14.0)
Requirement already satisfied: markdown in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.5.0) (3.11.3)
Requirement already satisfied: graphviz in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ax-platform==1.3.1->optimeo==1.5.0) (0.21)
Requirement already satisfied: patsy in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from dexpy==0.12->optimeo==1.5.0) (1.0.3)
Requirement already satisfied: pyDOE in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from doepy==0.0.1->optimeo==1.5.0) (0.9.3)
Requirement already satisfied: diversipy in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from doepy==0.0.1->optimeo==1.5.0) (0.9)
Requirement already satisfied: contourpy>=1.0.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.5.0) (1.3.3)
Requirement already satisfied: cycler>=0.10 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.5.0) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.5.0) (4.68.0)
Requirement already satisfied: kiwisolver>=1.3.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.5.0) (1.5.1)
Requirement already satisfied: packaging>=20.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.5.0) (24.2)
Requirement already satisfied: pillow>=8 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.5.0) (11.3.0)
Requirement already satisfied: pyparsing>=2.3.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.5.0) (3.3.3)
Requirement already satisfied: python-dateutil>=2.7 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from matplotlib==3.10.1->optimeo==1.5.0) (4.0.0)
Requirement already satisfied: et-xmlfile in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from openpyxl==3.1.5->optimeo==1.5.0) (2.0.0)
Requirement already satisfied: pytz>=2020.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pandas==2.2.3->optimeo==1.5.0) (2026.6)
Requirement already satisfied: tzdata>=2022.7 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pandas==2.2.3->optimeo==1.5.0) (2026.6)
Requirement already satisfied: tenacity>=6.2.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from plotly==5.24.0->optimeo==1.5.0) (9.2.1)
Requirement already satisfied: natsort in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pyjanitor==0.31.0->optimeo==1.5.0) (8.4.0)
Requirement already satisfied: pandas_flavor in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pyjanitor==0.31.0->optimeo==1.5.0) (0.8.1)
Requirement already satisfied: multipledispatch in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pyjanitor==0.31.0->optimeo==1.5.0) (1.0.0)
Requirement already satisfied: joblib>=1.2.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from scikit_learn==1.6.1->optimeo==1.5.0) (1.6.0)
Requirement already satisfied: threadpoolctl>=3.1.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from scikit_learn==1.6.1->optimeo==1.5.0) (3.8.0)
Requirement already satisfied: altair<6,>=4.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (5.5.0)
Requirement already satisfied: blinker<2,>=1.0.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (1.9.0)
Requirement already satisfied: cachetools<6,>=4.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (5.5.2)
Requirement already satisfied: click<9,>=7.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (8.5.1)
Requirement already satisfied: protobuf<6,>=3.20 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (5.29.6)
Requirement already satisfied: pyarrow>=7.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (26.0.1)
Requirement already satisfied: requests<3,>=2.27 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (2.34.2)
Requirement already satisfied: toml<2,>=0.10.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (0.10.2)
Requirement already satisfied: typing-extensions<5,>=4.4.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (4.16.0)
Requirement already satisfied: gitpython!=3.1.19,<4,>=3.0.7 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (3.2.1)
Requirement already satisfied: pydeck<1,>=0.8.0b4 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (0.9.3)
Requirement already satisfied: tornado<7,>=6.0.3 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from streamlit==1.44.1->optimeo==1.5.0) (6.6)
Requirement already satisfied: jsonschema>=3.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from altair<6,>=4.0->streamlit==1.44.1->optimeo==1.5.0) (4.26.0)
Requirement already satisfied: narwhals>=1.14.2 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from altair<6,>=4.0->streamlit==1.44.1->optimeo==1.5.0) (2.28.0)
Requirement already satisfied: gpytorch>=1.15.2 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (1.15.2)
Requirement already satisfied: linear_operator>=0.6.1 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (0.6.1)
Requirement already satisfied: torch>=2.4 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (2.15.0)
Requirement already satisfied: ninja in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (1.13.2)
Requirement already satisfied: pymoo in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.5.0) (0.6.2)
Requirement already satisfied: gitdb<5,>=4.0.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from gitpython!=3.1.19,<4,>=3.0.7->streamlit==1.44.1->optimeo==1.5.0) (4.0.12)
Requirement already satisfied: smmap<6,>=3.0.1 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (5.0.3)
Requirement already satisfied: charset_normalizer<4,>=2 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.5.0) (3.5.2)
Requirement already satisfied: idna<4,>=2.5 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.5.0) (3.20)
Requirement already satisfied: urllib3<3,>=1.26 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.5.0) (2.8.0)
Requirement already satisfied: certifi>=2023.5.7 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from requests<3,>=2.27->streamlit==1.44.1->optimeo==1.5.0) (2026.10.23)
Requirement already satisfied: mpmath<=1.3,>=0.19 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (1.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from jinja2->ax-platform==1.3.1->optimeo==1.5.0) (3.0.4)
Requirement already satisfied: cloudpickle>=3.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from joblib>=1.2.0->scikit_learn==1.6.1->optimeo==1.5.0) (3.1.2)
Requirement already satisfied: attrs>=22.2.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.5.0) (26.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.5.0) (2025.9.1)
Requirement already satisfied: referencing>=0.28.4 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.5.0) (0.37.0)
Requirement already satisfied: rpds-py>=0.25.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.44.1->optimeo==1.5.0) (2026.9.1)
Requirement already satisfied: formulaic>=1.1.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from statsmodels>=0.14.4->optimeo==1.5.0) (1.2.2)
Requirement already satisfied: interface-meta>=1.2.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from formulaic>=1.1.0->statsmodels>=0.14.4->optimeo==1.5.0) (2.0.1)
Requirement already satisfied: wrapt>=1.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from formulaic>=1.1.0->statsmodels>=0.14.4->optimeo==1.5.0) (2.5.2)
Requirement already satisfied: filelock in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (4.2.9)
Requirement already satisfied: setuptools>=77.0.3 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (79.0.1)
Requirement already satisfied: networkx>=2.5.1 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (3.6.1)
Requirement already satisfied: fsspec>=0.8.5 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (2026.9.0)
Requirement already satisfied: cuda-toolkit==13.2.2 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.2.2; 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.5.0) (13.2.2)
Requirement already satisfied: cuda-bindings<14,>=13.0.3 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (13.5.0)
Requirement already satisfied: nvidia-cudnn-cu13==9.26.0.51 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (9.26.0.51)
Requirement already satisfied: nvidia-cusparselt-cu13==0.8.1 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (0.8.1)
Requirement already satisfied: nvidia-nccl-cu13==2.30.7 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (2.30.7)
Requirement already satisfied: nvidia-nvshmem-cu13==3.7.2 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (3.7.2)
Requirement already satisfied: triton~=3.9.0 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (3.9.0)
Requirement already satisfied: nvidia-cublas==13.4.1.3.* in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.2.2; 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.5.0) (13.4.1.3)
Requirement already satisfied: nvidia-cuda-nvrtc==13.2.86.* in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.2.2; 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.5.0) (13.2.86)
Requirement already satisfied: nvidia-cuda-runtime==13.2.86.* in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.2.2; 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.5.0) (13.2.86)
Requirement already satisfied: nvidia-cufft==12.2.0.57.* in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.2.2; 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.5.0) (12.2.0.57)
Requirement already satisfied: nvidia-nvjitlink<14,>=13.2.86 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.2.2; 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.5.0) (13.5.37)
Requirement already satisfied: nvidia-cufile==1.17.1.22.* in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.2.2; 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.5.0) (1.17.1.22)
Requirement already satisfied: nvidia-cuda-cupti==13.2.86.* in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.2.2; 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.5.0) (13.2.86)
Requirement already satisfied: nvidia-cusolver==12.2.0.11.* in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.2.2; 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.5.0) (12.2.0.11)
Requirement already satisfied: nvidia-cusparse==12.7.10.12.* in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.2.2; 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.5.0) (12.7.10.12)
Requirement already satisfied: nvidia-nvtx==13.2.86.* in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.2.2; 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.5.0) (13.2.86)
Requirement already satisfied: nvidia-cuda-cccl in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from nvidia-nvshmem-cu13==3.7.2->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.5.0) (13.3.5.0.6)
Requirement already satisfied: cuda-pathfinder>=1.4.2 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (1.8.6)
Requirement already satisfied: comm>=0.1.3 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (0.2.3)
Requirement already satisfied: ipython>=6.1.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (9.18.1)
Requirement already satisfied: traitlets>=4.3.1 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (5.16.1)
Requirement already satisfied: widgetsnbextension~=4.0.16 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (4.0.16)
Requirement already satisfied: jupyterlab_widgets~=3.0.17 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (3.0.17)
Requirement already satisfied: ipython-pygments-lexers>=1.0.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (1.1.1)
Requirement already satisfied: jedi>=0.18.2 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (0.20.1)
Requirement already satisfied: matplotlib-inline>=0.1.6 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (0.2.2)
Requirement already satisfied: pexpect>4.6 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (4.9.0)
Requirement already satisfied: prompt_toolkit<3.1.0,>=3.0.41 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (3.0.53)
Requirement already satisfied: psutil>=7 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (7.2.2)
Requirement already satisfied: pygments>=2.14.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (2.21.0)
Requirement already satisfied: stack_data>=0.6.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (0.6.3)
Requirement already satisfied: wcwidth>=0.1.4 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (0.9.4)
Requirement already satisfied: parso<0.9.0,>=0.8.7 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from jedi>=0.18.2->ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (0.8.7)
Requirement already satisfied: ptyprocess>=0.5 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pexpect>4.6->ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (0.7.0)
Requirement already satisfied: executing>=1.2.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (2.3.0)
Requirement already satisfied: asttokens>=2.1.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (3.0.2)
Requirement already satisfied: pure-eval in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->ax-platform==1.3.1->optimeo==1.5.0) (0.2.4)
Requirement already satisfied: xarray in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pandas_flavor->pyjanitor==0.31.0->optimeo==1.5.0) (2026.9.0)
Requirement already satisfied: moocore>=0.1.7 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.5.0) (0.3.2)
Requirement already satisfied: autograd>=1.4 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.5.0) (1.9.1)
Requirement already satisfied: cma>=3.4.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.5.0) (4.5.0)
Requirement already satisfied: alive_progress in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.5.0) (3.3.0)
Requirement already satisfied: Deprecated in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pymoo->botorch[pymoo]<0.18.2dev9999,>=0.18.1->ax-platform==1.3.1->optimeo==1.5.0) (1.3.1)
Requirement already satisfied: cffi>=1.17.1 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (2.1.1)
Requirement already satisfied: platformdirs in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (4.14.5)
Requirement already satisfied: pycparser in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (3.12)
Requirement already satisfied: about-time==4.2.1 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (4.2.1)
Requirement already satisfied: graphemeu==0.7.2 in /opt/hostedtoolcache/Python/3.11.18/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.5.0) (0.7.2)
Requirement already satisfied: typing-inspect in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from pyre-extensions->ax-platform==1.3.1->optimeo==1.5.0) (0.9.0)
Requirement already satisfied: mypy-extensions>=0.3.0 in /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages (from typing-inspect->pyre-extensions->ax-platform==1.3.1->optimeo==1.5.0) (1.2.0)

[notice] A new release of pip is available: 26.2.2 -> 26.3
[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.937
Model: OLS Adj. R-squared: 0.931
Method: Least Squares F-statistic: 166.8
Date: Mon, 09 Nov 2026 Prob (F-statistic): 2.27e-26
Time: 09:03:17 Log-Likelihood: -139.75
No. Observations: 50 AIC: 289.5
Df Residuals: 45 BIC: 299.1
Df Model: 4
Covariance Type: nonrobust
coef std err t P>|t| [0.025 0.975]
Intercept -4.5614 2.158 -2.113 0.040 -8.909 -0.214
temp 0.4359 0.021 20.944 0.000 0.394 0.478
cA 23.3584 2.090 11.178 0.000 19.150 27.567
cB -6.9551 2.422 -2.872 0.006 -11.833 -2.078
cC -0.2835 2.156 -0.132 0.896 -4.625 4.058
Omnibus: 0.067 Durbin-Watson: 1.619
Prob(Omnibus): 0.967 Jarque-Bera (JB): 0.111
Skew: 0.073 Prob(JB): 0.946
Kurtosis: 2.821 Cond. No. 295.


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: 6.934e+04
Date: Mon, 09 Nov 2026 Prob (F-statistic): 1.59e-84
Time: 09:03:17 Log-Likelihood: 15.508
No. Observations: 50 AIC: -19.02
Df Residuals: 44 BIC: -7.544
Df Model: 5
Covariance Type: nonrobust
coef std err t P>|t| [0.025 0.975]
Intercept 2.4558 0.109 22.586 0.000 2.237 2.675
temp 0.2008 0.002 108.592 0.000 0.197 0.205
temp:cA 0.4978 0.003 147.853 0.000 0.491 0.505
cA 0.3387 0.182 1.859 0.070 -0.029 0.706
cB -0.4244 0.118 -3.587 0.001 -0.663 -0.186
cC -0.7331 0.098 -7.500 0.000 -0.930 -0.536
Omnibus: 1.369 Durbin-Watson: 2.519
Prob(Omnibus): 0.504 Jarque-Bera (JB): 1.345
Skew: 0.301 Prob(JB): 0.511
Kurtosis: 2.467 Cond. No. 500.


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.970632 ElasticNetCV
1 20.747111 Linear Model