Created
May 21, 2017 20:27
-
-
Save 8enmann/56ac666f5dccc7e9a48a7b1446760c78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# In case I ever revisit to learn tips and tricks!\n", | |
"\n", | |
"# First of all, the inline pylab is set up using\n", | |
"# c = get_config()\n", | |
"# c.InteractiveShellApp.matplotlib = \"inline\"\n", | |
"# in ~/.ipython/profile_default/startup/ipython_kernel_config.py\n", | |
"\n", | |
"import matplotlib.pyplot as plt\n", | |
"import numpy as np" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[[-3.13277902 0.58423566 -0.41126174 -0.11024437 -0.75800303]]\n", | |
"[[-3.13277902 0.58423566 -0.41126174 -0.11024437 -0.75800303]]\n", | |
"[-3.13277902 0.58423566 -0.41126174 -0.11024437 -0.75800303]\n" | |
] | |
} | |
], | |
"source": [ | |
"# If you want to end up with an ndarray after slicing,\n", | |
"# not a vector, you have to use a range, even a one-item range\n", | |
"x = np.random.randn(1, 5)\n", | |
"print(x[0:1, :])\n", | |
"print(x[:1, :])\n", | |
"print(x[0, :])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 21, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(2, 2)\n", | |
"(1, 2)\n" | |
] | |
} | |
], | |
"source": [ | |
"# Watch out!\n", | |
"bad = np.zeros(2) - np.random.randn(2, 1)\n", | |
"print(bad.shape)\n", | |
"\n", | |
"okay = np.zeros(2) - np.random.randn(1,2)\n", | |
"print(okay.shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(4,)\n", | |
"(4, 1)\n" | |
] | |
} | |
], | |
"source": [ | |
"# adding singleton dimension\n", | |
"a = np.array([1, 2, 3, 4])\n", | |
"print(a.shape)\n", | |
"print(a[:,None].shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"# label your dimensions\n", | |
"a_td = np.random.random((100, 3)) # time by dimensions" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 15, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(3,)" | |
] | |
}, | |
"execution_count": 15, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# What's summing doing? It removes that dimension\n", | |
"a_td.sum(axis=0).shape" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(1, 2, 4, 5)\n", | |
"(1, 2, 1, 4, 5)\n" | |
] | |
} | |
], | |
"source": [ | |
"# Max, min, mean median all sum out the dimensions to obliterate\n", | |
"oblit = np.random.randn(1, 2, 3, 4, 5).sum(axis=2)\n", | |
"reduce = np.random.randn(1, 2, 3, 4, 5).sum(axis=2, keepdims=True)\n", | |
"\n", | |
"print(oblit.shape)\n", | |
"print(reduce.shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# Workflow tips\n", | |
"\n", | |
"# hoj generally works in an ipy session,\n", | |
"# makes something a function once it gets repeated,\n", | |
"# makes a file once there are a few functions\n", | |
"\n", | |
"# !! you can start an embedded \n", | |
"# import IPython; Ipython.embed()\n", | |
"\n", | |
"# move things out of ipy notebooks as fast as possible to avoid\n", | |
"# variables still in scope from doing wacky things\n", | |
"\n", | |
"# if you're developing an algorithm, the thing to think about\n", | |
"# is what to print at each iteration:\n", | |
"# - policy gradient: the distance between last and new policy\n", | |
"# - for evolution, look at populations. eg. rank of the mean\n", | |
"# - L2 norm of parameters in neural net\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 20, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgcAAAFkCAYAAAC0KZhSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3X9wZWld5/H39zpR7PbSUyXyw7aXZBbFYLlgB3VTPcjq\nNN2RIpnGthYCLuy6sCCkQmWmC6ESt1tJVmS7OwQJapW1JT8kLthrkWzRHQda3SXEZukIbMl1V4tp\ngZlhlB82lx6Ru55n/7hp0yeT7k53cu5Jbt6vqtSQc849z3ceMvd+7nOec55IKSFJknRVpewCJEnS\n1mI4kCRJOYYDSZKUYziQJEk5hgNJkpRjOJAkSTmGA0mSlGM4kCRJOYYDSZKUYziQJEk5tx0OIuJ5\nETEbEQ9FRBYRA9fsuyMifi0iPhMR31g+5t0R8bTNKVuSJBVlIyMHu4FPAa8HVi/QsAt4DvDLwI8A\nLwaeCXxoA+1JkqQWiM1YeCkiMuBISmn2Bsc8F7gAPD2l9MUNNypJkgrRyjkHd9IcYfi7FrYpSZJu\n0R2taCQivgN4K/D+lNI3bnDcdwOHgUvAN1tRmyRJbeIJQCcwn1L6ykZOVHg4iIg7gA/SHDV43U0O\nPwz8btE1SZLUxl4OvH8jJyg0HFwTDPYBP3WjUYNllwDe97730d3dXWRpW97IyAiTk5Nll7El2BdN\n9sMK+6LJflix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AnU0qfL7ueknwE+GGa3w6f\nvfzzSZrflJ+9wxbxWuDxl9eeCfx1CbWUaReP/yacsQXew8qUUnqQZkC49v3ziTQvP+2o989rgsFd\nwD0ppZ12R89V7wH+BSvvnc8GHqYZsA+v9yRb5bLCaeDdEXER+AQwQvPN4HfKLKrVIuJdwCAwAFyJ\niKvfBi6nlHbMEtYppSs0h47/SURcAb5yu5NrtrFJYCEi3gx8gOab/qto3t65k8wBoxHxBeDPgf00\n3yd+u9SqWiAidgPPoDlCAHDX8oTMr6aUvkDzEtxYRPwVzcXu3gJ8kTa7je9G/UDzw+8MzS8ULwI6\nrnn//Gq7XZ5cx9/E11Yd36B5t89frruRlNKW+KF5begS8Pc0b794btk1ldAHGc1LLKt/XlF2bWX/\n0Fz++3TZdZT07/5C4DPAYzQ/GH++7JpK6IPdNL9EPEjzPv6/pHlP+x1l19aCf/fnX+e94b9cc8wJ\nmh+QjwHzwDPKrruV/UBz2Hz1vqu//0TZtZfxN7Hq+M8Bw7fSxpZ4zoEkSdo6dvT1OkmS9HiGA0mS\nlGM4kCRJOYYDSZKUYziQJEk5hgNJkpRjOJAkSTmGA0mSlGM4kCRJOYYDSZKUYziQJEk5/x8W97QK\nbAh3TAAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x10885fa58>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# plotting\n", | |
"plt.plot(np.arange(15), np.arange(15)-2, 'o')\n", | |
"plt.show()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAW0AAAFyCAYAAAA+gYtsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAFE9JREFUeJzt3X+w5XV93/Hnix/jQjKWRgRJ1dJERJQNCJJIHdQG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CGAB1fVnZNt/5rhFFRHV9XGJfz8j1XVJZP7PAc4neGcjP9jsu33gZuSHFBV35rcZi/gdVV1x+Q6\nFwFbz+H42MnXx7Z+f2ePTQL3tNXL1vM97mxP9GnAN7cGG2Bytpp7gcOW+PNvXXCfW88tetuC72+Z\nzLhwKeb+BUGG4TyOB0zu47sMe+Yfn7yQ+uYkT1jijFrljLY6+d8Mwd5ZfMP2o76j7TCcTzCLtu29\nnett78zuC7dtvf89dvD9rdd55GdV1W8wLIvcyHBW8S8n+cUdzCkZbfUx2TO9Fnhjkn0Wfz/JP2A4\nN+STk/yjBdufDmz93vZ8GzhowfX3YFhiWRFVtamqfr+qnsNwjsNTV+pnqx+jrW5OB/YEbk5ycpKn\nJHlakjcDN1XVdQzLGJcneeZkr/VS4JNVtaM31FwP/PMkJyU5lOEIlf1m/UCSHJzknUmeneTJSV4E\nHMKOn1wkX4hUL1V1R5KjgLMYjsI4iGFPeSPw+snVXgpcCHyaYenjz4A37+Ru3wf8AkPcf8xwVvPr\nF//o7Y2zi9t25H6GNfhXAY9jWO++sKo27MZ9aI3xxL6S1IjLI5LUiNGWpEaMtiQ1YrQlqRGjLUmN\nGG1JasRoS1IjRluSGjHaktSI0ZakRoy2JDXy/wHpsvt4LeRHrgAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x10848e9e8>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# ylabel is rows and xlabel is columns\n", | |
"a = np.zeros([10, 10])\n", | |
"a[0][2] = 1\n", | |
"plt.imshow(a, interpolation='nearest', origin='upper')\n", | |
"plt.ylabel('Rows'), plt.xlabel('Columns')\n", | |
"plt.show()" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.5.2" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment