Setting the file. One moment.
Subchapter 17.6
assets/experiment-template.ipynb
Notebook110 lines3 KB
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Experiment: TITLE\n",
"\n",
"Objective:\n",
"- State the question you want to answer.\n",
"- Define the success criteria.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Setup: imports and reproducibility\n",
"from __future__ import annotations\n",
"\n",
"import random\n",
"import statistics\n",
"\n",
"SEED = 7\n",
"random.seed(SEED)\n",
"SEED\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Plan\n",
"\n",
"- Hypothesis:\n",
"- Variables to sweep:\n",
"- Metrics to record:\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Define parameters and lightweight helpers\n",
"sample_size = 20\n",
"values = [random.random() for _ in range(sample_size)]\n",
"summary = {\n",
" \"count\": len(values),\n",
" \"mean\": statistics.fmean(values),\n",
" \"min\": min(values),\n",
" \"max\": max(values),\n",
"}\n",
"summary\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Results\n",
"\n",
"- Key observations:\n",
"- Surprises or failure modes:\n",
"- Decision: continue, pivot, or stop:\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Record findings in a minimal, copy-pasteable structure\n",
"result = {\n",
" \"seed\": SEED,\n",
" \"mean\": summary[\"mean\"],\n",
" \"range\": summary[\"max\"] - summary[\"min\"],\n",
"}\n",
"result\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Next steps\n",
"\n",
"- What to try next:\n",
"- What to document elsewhere (PRD, notes, issue):\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}