From 6dabcf91c11494a5cef6a76e7e59199a8ee531c2 Mon Sep 17 00:00:00 2001 From: Ryan Lapcevic Date: Mon, 9 Oct 2017 03:59:32 -0400 Subject: [PATCH] fixed broken merge --- .gitignore | 1 + Gaussian.ipynb | 67 ++-- Regression.ipynb | 917 ----------------------------------------------- 3 files changed, 28 insertions(+), 957 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dc50a0c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.ipynb_checkpoints/ diff --git a/Gaussian.ipynb b/Gaussian.ipynb index 7d7bc1c..fc7052a 100644 --- a/Gaussian.ipynb +++ b/Gaussian.ipynb @@ -4,7 +4,9 @@ "cell_type": "code", "execution_count": 2, "metadata": { - "collapsed": true + "collapsed": true, + "deletable": true, + "editable": true }, "outputs": [], "source": [ @@ -16,8 +18,6 @@ "seaborn.set_context(\"talk\", font_scale=1.5)\n", "seaborn.set_style(\"whitegrid\")\n", "%matplotlib inline\n", - "\n", - "# Define standard numpy ops.\n", "det = np.linalg.det\n", "inv = np.linalg.inv" ] @@ -26,42 +26,31 @@ "cell_type": "code", "execution_count": 3, "metadata": { - "collapsed": true + "collapsed": true, + "deletable": true, + "editable": true }, "outputs": [], "source": [ - "# MVN pdf function. \n", "def gaussian_pdf(x, mu, sigma):\n", - " \"Two parameters mu and sigma\"\n", " norm = (det(2 * np.pi * sigma)** (-1/2.))\n", " r = (x - mu)\n", - " return norm * np.exp(-(1/2.) * (r.dot(inv(sigma)) * r).sum(1)) " + " return norm * np.exp(-(1/2.) * (r.dot(inv(sigma)) * r).sum(1)) \n", + " " ] }, { "cell_type": "code", "execution_count": 4, -<<<<<<< HEAD - "metadata": {}, -======= "metadata": { "collapsed": false, "deletable": true, "editable": true }, ->>>>>>> ef03b90fc0c6003371fec40efd87dee6a2633448 "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { -<<<<<<< HEAD - "model_id": "b45526980cc44367b099b8ebfa406a0d", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "A Jupyter Widget" -======= "model_id": "2377711d9b3d48c5999dad7da0d0d37c" } }, @@ -183,7 +172,6 @@ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaMAAAEwCAYAAAAaZx4ZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VOW9x/FPCCFhF0QQQRah/FTcKghuCOJu3dFWrV6r\nttpWu1tbd7SttfXWe1u1q1utWvf91rqDoAgVXBF+GhCVHdmREMhy/3jOwBhmwkwyk5NJvu/XK69D\n5pznzG8Ok/nNs5znKaqtrUVERCRObeIOQERERMlIRERip2QkIiKxUzISEZHYKRmJiEjslIxERCR2\nbeMOQJoHMxsMnAEcDewM9ALWA/OBycDd7j4lvgjzy8wS9zjs7O7zY4zjQGAi8HV3fzDp8TbA2cB3\ngF2BIuBt4GZ3f6gBz7MLcCUwBtgJWAI8BfzC3ZfkqkxjmVkp8B+gg7sPzsH5yoCpwF7AKHefnOa4\nE4AfA0OB9sAs4Dbgr+5eW+fYPwNHAfu6+8rGxthaqWbUyplZezO7DfgAuA7YPfr348CrwHbAt4HX\nzOwBM+sQW7AtnJl1BR4AXqiTiIqAO4C7CP8/E4FpwP7Ag2b231k+z5eBGcC5wGpCQqkGLgLeNrNB\nuSjTWGZWAtwD7JnD0/4PIRHV97zXAU8Qru8bwARCUvozcH/0xSDZz4GOwO05jLPVUTJqxcysHfAM\ncD6wGDgd6OHuh7v719z9OHffGRgLzAW+Cvw1toDza7foZ3GMMdwI9AZ+WOfx/wLOARwY4u4nuvsR\nwAhgOfATMxubyROYWTHwINAV+JG7f9ndTwOGAH8h1IjvbGyZxjKznYBngVNzeM5TCV+s6jtmNHAV\nsBTY292PcffjCO+NOYS/gXOTy7j7KuBq4GQz+2qu4m1tlIxatyuB0cBCYKS7P+Du1XUPcveXCQlp\nHfB1M6v3m2UhcvfZ0U9VHM9vZnsTvhQ85O5eZ/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ERGJnZKRiIjE7v8BVyvd\nrwqL5SwAAAAASUVORK5CYII=\n", "text/plain": [ "" ->>>>>>> ef03b90fc0c6003371fec40efd87dee6a2633448 ] }, "metadata": {}, @@ -192,7 +180,9 @@ ], "source": [ "%matplotlib inline\n", + "\n", "def plot(mean=0, variance=1):\n", + " \n", " x = np.linspace(-10, 10, 100)\n", " y = gaussian_pdf(x.reshape(100, 1), np.array([mean]), np.array([[variance]]))\n", " plt.plot(x, y)\n", @@ -206,8 +196,11 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 79, "metadata": { + "collapsed": false, + "deletable": true, + "editable": true, "scrolled": false }, "outputs": [ @@ -991,7 +984,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -1003,13 +996,8 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "c7280d187d56426ca63b85f422c72549", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "A Jupyter Widget" - ] + "model_id": "d0a30a6eb0f544cfbb4b46a8d47d90d9" + } }, "metadata": {}, "output_type": "display_data" @@ -1021,8 +1009,12 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": {}, + "execution_count": 112, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, "outputs": [ { "data": { @@ -1804,7 +1796,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -1816,13 +1808,8 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "9fc64c017e8a47879573a108725f3ce9", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "A Jupyter Widget" - ] + "model_id": "7b7880b6368f493b8b44ce02fa0acafb" + } }, "metadata": {}, "output_type": "display_data" @@ -1890,7 +1877,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "IPython (Python 3)", "language": "python", "name": "python3" }, diff --git a/Regression.ipynb b/Regression.ipynb index d3ded0b..e0b6c13 100644 --- a/Regression.ipynb +++ b/Regression.ipynb @@ -2,24 +2,6 @@ "cells": [ { "cell_type": "code", -<<<<<<< HEAD - "execution_count": 1, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "from ipywidgets import interact, interactive, fixed, interact_manual\n", - "import seaborn\n", - "import matplotlib.pyplot as plt\n", - "from scipy.special import gamma\n", - "import numpy as np\n", - "seaborn.set_context(\"talk\", font_scale=1.5)\n", - "seaborn.set_style(\"whitegrid\")\n", - "%matplotlib inline\n", - "det = np.linalg.det\n", - "inv = np.linalg.inv" -======= "execution_count": 11, "metadata": { "collapsed": false @@ -40,24 +22,10 @@ "%pylab inline\n", "pylab.rcParams['figure.figsize'] = (15, 6)\n", "seaborn.set_context(\"talk\")" ->>>>>>> ef03b90fc0c6003371fec40efd87dee6a2633448 ] }, { "cell_type": "code", -<<<<<<< HEAD - "execution_count": 2, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "n = 100\n", - "m = 2\n", - "X = np.random.uniform(-5, 5, [n, m])\n", - "eps = np.random.normal(0, 10, size = [n])\n", - "y_t = X.dot(np.array([1,-1])) + eps" -======= "execution_count": 12, "metadata": { "collapsed": false @@ -151,45 +119,18 @@ "X = bos[\"data\"][:, 0:1]\n", "y = bos[\"target\"]\n", "model = sklearn.linear_model.LinearRegression().fit(X, y)" ->>>>>>> ef03b90fc0c6003371fec40efd87dee6a2633448 ] }, { "cell_type": "code", -<<<<<<< HEAD - "execution_count": 71, - "metadata": {}, -======= "execution_count": 15, "metadata": { "collapsed": false }, ->>>>>>> ef03b90fc0c6003371fec40efd87dee6a2633448 "outputs": [ { "data": { "text/plain": [ -<<<<<<< HEAD - "array([[-2.15041117, 6.55815018],\n", - " [-9.50044274, -4.90082273],\n", - " [ 7.82498259, -0.50614231],\n", - " [-9.95087225, -4.90338961],\n", - " [-6.6988994 , -6.76605522],\n", - " [-4.38158872, 0.4345616 ],\n", - " [ 4.78315277, 8.37718135],\n", - " [-6.00449303, -0.18639599],\n", - " [-1.212048 , 9.78179806],\n", - " [ 7.11581946, -7.97778446]])" - ] - }, - "execution_count": 71, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "np.random.uniform(-10, 10, [10,2])" -======= "" ] }, @@ -212,37 +153,18 @@ "plt.scatter(X, y)\n", "plt.ylabel(\"price\")\n", "plt.xlabel(\"median crime rate\")" ->>>>>>> ef03b90fc0c6003371fec40efd87dee6a2633448 ] }, { "cell_type": "code", -<<<<<<< HEAD - "execution_count": 72, - "metadata": {}, -======= "execution_count": 16, "metadata": { "collapsed": false }, ->>>>>>> ef03b90fc0c6003371fec40efd87dee6a2633448 "outputs": [ { "data": { "text/plain": [ -<<<<<<< HEAD - "(2,)" - ] - }, - "execution_count": 72, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "w_hat = inv(X.T.dot(X)).dot(X.T).dot(y_t) \n", - "w_hat.shape" -======= "" ] }, @@ -269,800 +191,10 @@ "plt.plot(test_x, test_y, c =\"red\" )\n", "plt.ylabel(\"price\")\n", "plt.xlabel(\"median crime rate\")" ->>>>>>> ef03b90fc0c6003371fec40efd87dee6a2633448 ] }, { "cell_type": "code", -<<<<<<< HEAD - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "application/javascript": [ - "/* Put everything inside the global mpl namespace */\n", - "window.mpl = {};\n", - "\n", - "\n", - "mpl.get_websocket_type = function() {\n", - " if (typeof(WebSocket) !== 'undefined') {\n", - " return WebSocket;\n", - " } else if (typeof(MozWebSocket) !== 'undefined') {\n", - " return MozWebSocket;\n", - " } else {\n", - " alert('Your browser does not have WebSocket support.' +\n", - " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", - " 'Firefox 4 and 5 are also supported but you ' +\n", - " 'have to enable WebSockets in about:config.');\n", - " };\n", - "}\n", - "\n", - "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", - " this.id = figure_id;\n", - "\n", - " this.ws = websocket;\n", - "\n", - " this.supports_binary = (this.ws.binaryType != undefined);\n", - "\n", - " if (!this.supports_binary) {\n", - " var warnings = document.getElementById(\"mpl-warnings\");\n", - " if (warnings) {\n", - " warnings.style.display = 'block';\n", - " warnings.textContent = (\n", - " \"This browser does not support binary websocket messages. \" +\n", - " \"Performance may be slow.\");\n", - " }\n", - " }\n", - "\n", - " this.imageObj = new Image();\n", - "\n", - " this.context = undefined;\n", - " this.message = undefined;\n", - " this.canvas = undefined;\n", - " this.rubberband_canvas = undefined;\n", - " this.rubberband_context = undefined;\n", - " this.format_dropdown = undefined;\n", - "\n", - " this.image_mode = 'full';\n", - "\n", - " this.root = $('
');\n", - " this._root_extra_style(this.root)\n", - " this.root.attr('style', 'display: inline-block');\n", - "\n", - " $(parent_element).append(this.root);\n", - "\n", - " this._init_header(this);\n", - " this._init_canvas(this);\n", - " this._init_toolbar(this);\n", - "\n", - " var fig = this;\n", - "\n", - " this.waiting = false;\n", - "\n", - " this.ws.onopen = function () {\n", - " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", - " fig.send_message(\"send_image_mode\", {});\n", - " if (mpl.ratio != 1) {\n", - " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", - " }\n", - " fig.send_message(\"refresh\", {});\n", - " }\n", - "\n", - " this.imageObj.onload = function() {\n", - " if (fig.image_mode == 'full') {\n", - " // Full images could contain transparency (where diff images\n", - " // almost always do), so we need to clear the canvas so that\n", - " // there is no ghosting.\n", - " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", - " }\n", - " fig.context.drawImage(fig.imageObj, 0, 0);\n", - " };\n", - "\n", - " this.imageObj.onunload = function() {\n", - " this.ws.close();\n", - " }\n", - "\n", - " this.ws.onmessage = this._make_on_message_function(this);\n", - "\n", - " this.ondownload = ondownload;\n", - "}\n", - "\n", - "mpl.figure.prototype._init_header = function() {\n", - " var titlebar = $(\n", - " '
');\n", - " var titletext = $(\n", - " '
');\n", - " titlebar.append(titletext)\n", - " this.root.append(titlebar);\n", - " this.header = titletext[0];\n", - "}\n", - "\n", - "\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._init_canvas = function() {\n", - " var fig = this;\n", - "\n", - " var canvas_div = $('
');\n", - "\n", - " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", - "\n", - " function canvas_keyboard_event(event) {\n", - " return fig.key_event(event, event['data']);\n", - " }\n", - "\n", - " canvas_div.keydown('key_press', canvas_keyboard_event);\n", - " canvas_div.keyup('key_release', canvas_keyboard_event);\n", - " this.canvas_div = canvas_div\n", - " this._canvas_extra_style(canvas_div)\n", - " this.root.append(canvas_div);\n", - "\n", - " var canvas = $('');\n", - " canvas.addClass('mpl-canvas');\n", - " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", - "\n", - " this.canvas = canvas[0];\n", - " this.context = canvas[0].getContext(\"2d\");\n", - "\n", - " var backingStore = this.context.backingStorePixelRatio ||\n", - "\tthis.context.webkitBackingStorePixelRatio ||\n", - "\tthis.context.mozBackingStorePixelRatio ||\n", - "\tthis.context.msBackingStorePixelRatio ||\n", - "\tthis.context.oBackingStorePixelRatio ||\n", - "\tthis.context.backingStorePixelRatio || 1;\n", - "\n", - " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", - "\n", - " var rubberband = $('');\n", - " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", - "\n", - " var pass_mouse_events = true;\n", - "\n", - " canvas_div.resizable({\n", - " start: function(event, ui) {\n", - " pass_mouse_events = false;\n", - " },\n", - " resize: function(event, ui) {\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " stop: function(event, ui) {\n", - " pass_mouse_events = true;\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " });\n", - "\n", - " function mouse_event_fn(event) {\n", - " if (pass_mouse_events)\n", - " return fig.mouse_event(event, event['data']);\n", - " }\n", - "\n", - " rubberband.mousedown('button_press', mouse_event_fn);\n", - " rubberband.mouseup('button_release', mouse_event_fn);\n", - " // Throttle sequential mouse events to 1 every 20ms.\n", - " rubberband.mousemove('motion_notify', mouse_event_fn);\n", - "\n", - " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", - " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", - "\n", - " canvas_div.on(\"wheel\", function (event) {\n", - " event = event.originalEvent;\n", - " event['data'] = 'scroll'\n", - " if (event.deltaY < 0) {\n", - " event.step = 1;\n", - " } else {\n", - " event.step = -1;\n", - " }\n", - " mouse_event_fn(event);\n", - " });\n", - "\n", - " canvas_div.append(canvas);\n", - " canvas_div.append(rubberband);\n", - "\n", - " this.rubberband = rubberband;\n", - " this.rubberband_canvas = rubberband[0];\n", - " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", - " this.rubberband_context.strokeStyle = \"#000000\";\n", - "\n", - " this._resize_canvas = function(width, height) {\n", - " // Keep the size of the canvas, canvas container, and rubber band\n", - " // canvas in synch.\n", - " canvas_div.css('width', width)\n", - " canvas_div.css('height', height)\n", - "\n", - " canvas.attr('width', width * mpl.ratio);\n", - " canvas.attr('height', height * mpl.ratio);\n", - " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", - "\n", - " rubberband.attr('width', width);\n", - " rubberband.attr('height', height);\n", - " }\n", - "\n", - " // Set the figure to an initial 600x600px, this will subsequently be updated\n", - " // upon first draw.\n", - " this._resize_canvas(600, 600);\n", - "\n", - " // Disable right mouse context menu.\n", - " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", - " return false;\n", - " });\n", - "\n", - " function set_focus () {\n", - " canvas.focus();\n", - " canvas_div.focus();\n", - " }\n", - "\n", - " window.setTimeout(set_focus, 100);\n", - "}\n", - "\n", - "mpl.figure.prototype._init_toolbar = function() {\n", - " var fig = this;\n", - "\n", - " var nav_element = $('
')\n", - " nav_element.attr('style', 'width: 100%');\n", - " this.root.append(nav_element);\n", - "\n", - " // Define a callback function for later on.\n", - " function toolbar_event(event) {\n", - " return fig.toolbar_button_onclick(event['data']);\n", - " }\n", - " function toolbar_mouse_event(event) {\n", - " return fig.toolbar_button_onmouseover(event['data']);\n", - " }\n", - "\n", - " for(var toolbar_ind in mpl.toolbar_items) {\n", - " var name = mpl.toolbar_items[toolbar_ind][0];\n", - " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", - " var image = mpl.toolbar_items[toolbar_ind][2];\n", - " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", - "\n", - " if (!name) {\n", - " // put a spacer in here.\n", - " continue;\n", - " }\n", - " var button = $('