{ "cells": [ { "cell_type": "markdown", "id": "7c898a5d", "metadata": {}, "source": [ "# Logistic regression: elasticity\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "5e660515", "metadata": { "execution": { "iopub.execute_input": "2026-09-14T14:44:31.675138Z", "iopub.status.busy": "2026-09-14T14:44:31.675138Z", "iopub.status.idle": "2026-09-14T14:44:36.623377Z", "shell.execute_reply": "2026-09-14T14:44:36.621842Z" } }, "outputs": [], "source": [ "from pathlib import Path\n", "import sys\n", "\n", "PROJECT_ROOT = Path.cwd().resolve()\n", "while not (PROJECT_ROOT / 'data.py').exists():\n", " if PROJECT_ROOT.parent == PROJECT_ROOT:\n", " raise FileNotFoundError('Open this notebook from inside organized_uncertainty_analysis.')\n", " PROJECT_ROOT = PROJECT_ROOT.parent\n", "if str(PROJECT_ROOT.parent) not in sys.path:\n", " sys.path.insert(0, str(PROJECT_ROOT.parent))\n", "\n", "import numpy as np\n", "from organized_uncertainty_analysis.logistic.data_fit_gof import prepare_full_trim, fit_logistic_x\n", "from organized_uncertainty_analysis.logistic import elasticity as el\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "af2edcbc", "metadata": { "execution": { "iopub.execute_input": "2026-09-14T14:44:36.632763Z", "iopub.status.busy": "2026-09-14T14:44:36.630744Z", "iopub.status.idle": "2026-09-14T14:44:45.485776Z", "shell.execute_reply": "2026-09-14T14:44:45.483765Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[trim] removed index=53, x_raw=2.481226, y=0\n" ] }, { "data": { "text/html": [ "
| \n", " | Panel | \n", "transform | \n", "theta0 | \n", "theta1 | \n", "x50 | \n", "s50 | \n", "E_x50_theta0 | \n", "E_x50_theta1 | \n", "E_s50_theta0 | \n", "E_s50_theta1 | \n", "
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "FULL-RAW | \n", "raw | \n", "-11.683870 | \n", "5.686964 | \n", "2.054500 | \n", "1.421741 | \n", "1.000000 | \n", "-1.000000 | \n", "0.000000 | \n", "1.000000 | \n", "
| 1 | \n", "FULL-LOG | \n", "log | \n", "-7.527408 | \n", "10.738157 | \n", "2.015760 | \n", "1.331775 | \n", "0.700996 | \n", "-0.700996 | \n", "-0.700996 | \n", "1.700996 | \n", "
| 2 | \n", "TRIM-RAW | \n", "raw | \n", "-26.022861 | \n", "14.660490 | \n", "1.775033 | \n", "3.665123 | \n", "1.000000 | \n", "-1.000000 | \n", "0.000000 | \n", "1.000000 | \n", "
| 3 | \n", "TRIM-LOG | \n", "log | \n", "-14.173996 | \n", "24.851636 | \n", "1.768876 | \n", "3.512347 | \n", "0.570345 | \n", "-0.570345 | \n", "-0.570345 | \n", "1.570345 | \n", "