Commit 302725bd authored by Mark Daoust's avatar Mark Daoust
Browse files

Created using Colaboratory

parent f0e10716
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"colab": { "colab": {
"name": "basic-regression.ipynb", "name": "basic-regression.ipynb",
"version": "0.3.2", "version": "0.3.2",
"views": {},
"default_view": {},
"provenance": [], "provenance": [],
"private_outputs": true, "private_outputs": true,
"collapsed_sections": [ "collapsed_sections": [
...@@ -34,12 +32,7 @@ ...@@ -34,12 +32,7 @@
"metadata": { "metadata": {
"id": "AwOEIRJC6Une", "id": "AwOEIRJC6Une",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -62,12 +55,7 @@ ...@@ -62,12 +55,7 @@
"metadata": { "metadata": {
"id": "KyPEtTqk6VdG", "id": "KyPEtTqk6VdG",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -144,12 +132,7 @@ ...@@ -144,12 +132,7 @@
"metadata": { "metadata": {
"id": "1rRo8oNqZ-Rj", "id": "1rRo8oNqZ-Rj",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -179,12 +162,7 @@ ...@@ -179,12 +162,7 @@
"metadata": { "metadata": {
"id": "p9kxxgzvzlyz", "id": "p9kxxgzvzlyz",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -216,12 +194,7 @@ ...@@ -216,12 +194,7 @@
"metadata": { "metadata": {
"id": "Ujqcgkipr65P", "id": "Ujqcgkipr65P",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -263,12 +236,7 @@ ...@@ -263,12 +236,7 @@
"metadata": { "metadata": {
"id": "8tYsm8Gs03J4", "id": "8tYsm8Gs03J4",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -291,12 +259,7 @@ ...@@ -291,12 +259,7 @@
"metadata": { "metadata": {
"id": "pYVyGhdyCpIM", "id": "pYVyGhdyCpIM",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -327,12 +290,7 @@ ...@@ -327,12 +290,7 @@
"metadata": { "metadata": {
"id": "I8NwI2ND2t4Y", "id": "I8NwI2ND2t4Y",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -357,12 +315,7 @@ ...@@ -357,12 +315,7 @@
"metadata": { "metadata": {
"id": "ze5WQP8R1TYg", "id": "ze5WQP8R1TYg",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -404,12 +357,7 @@ ...@@ -404,12 +357,7 @@
"metadata": { "metadata": {
"id": "c26juK7ZG8j-", "id": "c26juK7ZG8j-",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -450,12 +398,7 @@ ...@@ -450,12 +398,7 @@
"metadata": { "metadata": {
"id": "sD7qHCmNIOY0", "id": "sD7qHCmNIOY0",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -489,12 +432,7 @@ ...@@ -489,12 +432,7 @@
"metadata": { "metadata": {
"id": "B6XriGbVPh2t", "id": "B6XriGbVPh2t",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -533,12 +471,7 @@ ...@@ -533,12 +471,7 @@
"metadata": { "metadata": {
"id": "fdMZuhUgzMZ4", "id": "fdMZuhUgzMZ4",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -572,12 +505,7 @@ ...@@ -572,12 +505,7 @@
"metadata": { "metadata": {
"id": "jl_yNr5n1kms", "id": "jl_yNr5n1kms",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -604,18 +532,35 @@ ...@@ -604,18 +532,35 @@
"metadata": { "metadata": {
"id": "Xe7RXH3N3CWU", "id": "Xe7RXH3N3CWU",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
"test_predictions = model.predict(test_data).flatten()\n", "test_predictions = model.predict(test_data).flatten()\n",
"\n", "\n",
"print(test_predictions)" "plt.scatter(test_labels, test_predictions)\n",
"plt.xlabel('True Values [1000$]')\n",
"plt.ylabel('Predictions [1000$]')\n",
"plt.axis('equal')\n",
"plt.xlim(plt.xlim())\n",
"plt.ylim(plt.ylim())\n",
"_ = plt.plot([-100, 100],[-100,100])\n"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "f-OHX4DiXd8x",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"error = test_predictions - test_labels\n",
"plt.hist(error, bins = 50)\n",
"plt.xlabel(\"Prediction Error [1000$]\")\n",
"_ = plt.ylabel(\"Count\")"
], ],
"execution_count": 0, "execution_count": 0,
"outputs": [] "outputs": []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment