Skip to content

Commit

Permalink
curves
Browse files Browse the repository at this point in the history
  • Loading branch information
molguin92 committed Dec 18, 2023
1 parent e9546df commit 9781f49
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 33 deletions.
49 changes: 38 additions & 11 deletions analysis_2023/curve_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -400,30 +400,57 @@
},
{
"cell_type": "code",
"execution_count": 8,
"outputs": [],
"source": [],
"execution_count": 26,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Mean Square Error\n"
]
},
{
"data": {
"text/plain": "curve\na * e^x + b 0.112870\na * x^2 + b * x + c 0.107237\na * x^3 + b * x^2 + c * x + d 0.061166\na * x^b + c 0.100789\ndtype: float64"
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"errors = (\n",
" comp_means\n",
" .set_index([\"prev_ttf\", \"prev_duration\", \"neuro\", \"curve\"])\n",
" .unstack(level=-1)\n",
")\n",
"\n",
"errors.columns = errors.columns.droplevel(0)\n",
"base = errors[\"base\"]\n",
"errors = errors[[col for col in errors.columns if col != \"base\"]]\n",
"\n",
"errors = np.square(errors.sub(base, axis=0))\n",
"print(\"Mean Square Error\")\n",
"errors.stack().groupby([\"curve\"]).mean()"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-12-17T23:11:16.587240Z",
"start_time": "2023-12-17T23:11:16.585849Z"
"end_time": "2023-12-18T03:05:55.733694Z",
"start_time": "2023-12-18T03:05:55.705627Z"
}
},
"id": "c59fa8404d88aff0"
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-12-17T23:11:16.588034Z"
}
"collapsed": false
},
"id": "38f6c07149aa6c95"
"id": "d98dd73b5d970f76"
}
],
"metadata": {
Expand Down
Loading

0 comments on commit 9781f49

Please sign in to comment.