From f136bd7b142e2220583409014a515177595143cc Mon Sep 17 00:00:00 2001 From: Jasper Ginn Date: Tue, 5 Jan 2021 11:15:15 +0100 Subject: [PATCH] docs: update notebook and test CI/CD on GL --- notebooks/year_prediction_msd.ipynb | 44 +++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/notebooks/year_prediction_msd.ipynb b/notebooks/year_prediction_msd.ipynb index ba0d50e..7eb4a8f 100644 --- a/notebooks/year_prediction_msd.ipynb +++ b/notebooks/year_prediction_msd.ipynb @@ -9,7 +9,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -18,7 +18,7 @@ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", - "from piven.experiments import PivenMlpExperiment\n", + "from piven.models import PivenMlpModel\n", "import tensorflow as tf\n", "from sklearn.compose import TransformedTargetRegressor\n", "\n", @@ -27,7 +27,41 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "records = []\n", + "with dpath.open(\"r\") as infile:\n", + " for line in infile.readlines():\n", + " line_split = line.replace(\"\\n\", \"\").split(\",\")\n", + " year = int(line_split[0])\n", + " inputs = [*map(lambda x: float(x), line_split[1:])]\n", + " records.append([year] + inputs)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "records = []\n", + "with dpath.open(\"r\") as infile:\n", + " for line in infile.readlines():\n", + " line_split = line.replace(\"\\n\", \"\").split(\",\")\n", + " year = int(line_split[0])\n", + " inputs = [*map(lambda x: float(x), line_split[1:])]\n", + " records.append([year] + inputs)" + ] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1620,9 +1654,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "PyCharm (pivenregressor)", "language": "python", - "name": "python3" + "name": "pycharm-b9238b0d" }, "language_info": { "codemirror_mode": {