{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "

Model comparison

\n" ] }, { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib\n", "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "from scipy.stats import chi2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's start by simulating a data set with some polynomial plus noise. We will use numpy.polyval() to generate the polynomial: you get to choose what order you want by setting the number of input parameters (choose something between 3 and 6)." ] }, { "cell_type": "code", "execution_count": 46, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[]" ] }, "execution_count": 46, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD4CAYAAAAJmJb0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAfcklEQVR4nO3de3xU1b338c+PkEC4aLgLAQpWRKu0ovGKtSpW1FqNFBQslqJHej+2tqnynFdv59RCy9PLsXpasFhpK4q1CGhVHgtYrUUkGgVROaJQJKAgCKIkkMvv+WMPGiCXycye257v+/XKa2bv2bPX2iR8Z83aa69t7o6IiERTh0xXQEREUkchLyISYQp5EZEIU8iLiESYQl5EJMI6ZroCTfXu3duHDBmS6WqIiOSUZ5999m1379Pca1kV8kOGDKGysjLT1RARySlm9q+WXlN3jYhIhCnkRUQiTCEvIhJhCnkRkQhTyIuIRJhCXkQkwhTyIiIRppAXEYkwhbyISIZdNWsFV81akZJ9K+RFRCJMIS8iEmEKeRGRCFPIi4hEmEJeRCTCFPIiIhGmkBcRiTCFvIhIhCnkRUQiTCEvIhJhCnkRkQhTyIuIZNDCqmqqNu1i5YadjJqxjIVV1aHuv2MYOzGzjcAeoAGod/cyM+sJzAeGABuBK939nTDKExGJgoVV1UxbsIb9DY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8yrWW/GZgUJPlgRz+9e2DbcysI8FXvNa+HmW7eI4ZM7sA+A/gMnffl6a6pUpbx9wdOBF43Mw2EvRdLs7xk6/x/m0vcvc6d98ArCMI/VwVzzFfB9wH4O4rgM4EE3lFVVz/39sj10J+FTDMzIaaWRHBidXFh2yzGJgcez4OWOaxMxo5qs1jjnVdzCII+Fzvp4U2jtndd7t7b3cf4u5DCM5DXObulZmpbiji+dteSHCSHTPrTdB983paaxmueI55EzAawMyOJwj57WmtZXotBr4QG2VzBrDb3bcms8Oc6q5x93oz+zqwhODM/J3uvtbM/hOodPfFwByCr3TrCVrwEzJX4+TFecwzgW7An2PnmDe5+2UZq3SS4jzmSInzmJcAF5rZS0ADUOHuOzJX6+TEeczfBu4ws28RdFt8MZcbbWZ2D0F3W+/YeYYfAIUA7v5bgvMOlwDrgb3AlKTLzOF/LxERaUOuddeIiEg7KORFRCJMIS8iEmEKeRGRCFPIi4hEmEJeRCTCFPIiIhH2/wHXpfMAAePX5AAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "# simulate a data set witha polynomial and Gaussian uncertainties\n", "npts=20\n", "x=np.linspace(0,1,npts)\n", "\n", "# choose parameters for a polynomial here. Number of parameters you set will determine order of polynomial\n", "truepars=[50,-3,-5,3.7] # your choice of parameters and polynomial order there\n", "sig=5*np.ones(len(x)) # set uncertaintiesm, make sure they are noticeably large\n", "\n", "y=np.polyval(truepars,x)+np.random.normal(0,sig)\n", "\n", "plt.errorbar(x,y,sig,fmt='o') # plot it\n", "plt.plot(x,np.polyval(truepars,x))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

X$^2$ as a function of number of parameters" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's imagine that we have this data set, but don't know a priori what order fit to use. We want to answer the question: how do we know the most justified order of polynomial to use to do the fit? \n", "\n", "The problem is that it is hard to tell whether additional parameters are warranted: are they fitting real structure in the data, or are they fitting noise?\n", "\n", "First, let's demonstrate how X$^2$ varies with number of parameters. Remember,\n", "$$X^2 = \\sum {(y_i - f(x_i|p))^2\\over \\sigma_i^2}$$\n", "$f$ is the model function, in this case, numpy.polyval().\n", "\n", "We'll do the fits using our standard linear algebra:\n", "$$par = (A^T\\Sigma^{-1} A)^{-1} A^T\\Sigma^{-1} y$$\n", "where $A$ is the design matrix (the derivatives of the data with respect each parameter, that depends on the independent variable), $\\Sigma$ is the covariance matrix, and $y$ is the dependent variable array." ] }, { "cell_type": "code", "execution_count": 49, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(0, 50)" ] }, "execution_count": 49, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD4CAYAAAAJmJb0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nOzdd3hUVeL/8feZPpNk0nuHEGqooQgiTewKKqgotl1lf7prWXVX3WJZu37Xta4uay8IFhB0FRClSJXQQg0JKaT3MplMn/P7I0FBiiiTgOG8nidPmDv33nPuJfPJybnn3iOklCiKoijdk+ZkV0BRFEXpPCrkFUVRujEV8oqiKN2YCnlFUZRuTIW8oihKN6Y72RU4WFRUlExLSzvZ1VAURflV2bRpU52UMvpI751SIZ+WlkZOTs7JroaiKMqvihCi5Gjvqe4aRVGUbkyFvKIoSjemQl5RFKUbUyGvKIrSjamQVxRF6cZUyCuKonRjKuQVRVG6MRXyiqIo3ZgKeUVRlJNNiPavTqBCXlEUpRtTIa8oitKNqZBXFEXpxlTIK4qidGMq5BVFUboxFfKKoijdmAp5RVGUbkyFvKIoSjemQl5RFKUbUyGvKIpyMh18p2sn3PkakDlehRDFgA3wAV4pZbYQIgKYB6QBxcAVUsrGQJSnKIrSLRwt0IUAKQNSRCB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ARX0VUB/oyuesI9xlM4Pwt7V1QoixUkp7L8fWW7qS8/XAv6SUfxZCnAO81JZzqPfD6xc9Xr8G2pF8OZDZ7v4gjv36dqSNEEJH+Cve8b4ene66kjNCiNnAQ4QXVff2UWy95UQ5xwBjgTVCiMOE+y7fGeAnX7v6t71cSumXUhYD+wkX/YGqKznfCrwOIKXcAJgIT+QVqbr07/1kDLQi/xWQI4QYIoQwED6x+s632rwD3Nx2ez7wiWw7ozFAnTDntq6LFwgX+IHeTwsnyFlK6ZBSJkops6WU2YTPQ8yVUm7un3B7RFf+tt8mfJIdIUQi4e6bQ30aZc/qSs6lwIUAQojRhIt8XZ9G2bfeARa2jbI5G3BIKau684IDqrtGShkQQtwDfEj4zPyLUsoCIcRvgM1SyneA/0f4K10h4SP4Bf0Xcfd1MecngGjgjbZzzKVSyrn9FnQ3dTHniNLFnD8ELhZC7AGCwM+llA39F3X3dDHn+4C/CyF+QrjbYtFAPmgTQiwh3N2W2Hae4VeAHkBK+TfC5x0uAwoBF3BLt/c5gN8vRVEU5QQGWneNoiiKchJUkVcURYlgqsgriqJEMFXkFUVRIpgq8oqiKBFMFXlFUZQIpoq8oihKBPv/rRfEike55ScAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEKCAYAAAASByJ7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAARQElEQVR4nO3df6zddX3H8ecLisFWGKCFMUopWzrRGQV3RZTFZLAapg5I5jZdZ6qSdIluwylRTDezZWPDzahLZqadMJrsjrmgBuKis6kQ43TILSLCqitDwALS6wR/ddEh7/1xPpVSess97Tnne849z0fSfM/3e37cV5t7+7qf74/PN1WFJElHdB1Ak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2fQmDXw68L/AG6rqa0leT29m2aOBFcB5I/2LSAtwhCD1Zy3wgar6BeAR4Nfb9hVV9VLgTcDVbdtXgZe1SffexROvoH4JsKGqLAONDUcIUn++XlW3tcfbgTXt8bXQm7s+ybHt7lvHAFuSrKU3Z/1R+3zO1qo60Bz3UmccIUj9+eE+j3/M479U7T8HTAF/BtzY7ob2a/R2Ee31g6EllA6RhSANxm8BJPkleje6+Q7wU/SOMwC8vqNc0qJZCNJgPJzk88AHgb2zUf4V8JdJ/p3e/ZKlseZsp9JhSnITcFlVzXWdRTocjhAkSYAjBElS4whBkgRYCJKkxkKQJAEWgiSpsRAkSQD8P7hiMNtLpGFYAAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "# set up an empty list to accumulate our X2 values\n", "X2_vals=[]\n", "\n", "# loop over different number of paramters, e.g., fit from first to eighth order\n", "npars=range(1,15)\n", "for npar in npars : \n", " # do the least squares fit\n", " # design matrix for a polynomial is a Vandermonde matrix\n", " design=np.vander(x,npar,increasing=False)\n", " # covariance matrix (without covariances in the data, just diagonal)\n", " C=np.diag(sig**2)\n", " # inverse of covariance matrix\n", " Cinv=np.linalg.inv(C)\n", " # get left hand size AT Sigma-1 A\n", " ATA=np.dot(np.dot(design.T,Cinv),design)\n", " # solve for the parameters with rhs = AT Sigma-1 y\n", " par=np.linalg.solve(ATA,np.dot(np.dot(design.T,Cinv),y))\n", " \n", " #plot the fit\n", " plt.errorbar(x,y,sig,fmt='ro')\n", " xmod=np.arange(0,1,0.01)\n", " plt.plot(xmod,np.polyval(par,xmod))\n", " \n", " # calculate X2\n", " X2=np.sum((y-np.polyval(par,x))**2/sig**2) # fill in the X**2 expression\n", " X2_vals.append(X2)\n", "\n", "#plot the X**2 values as a function of number of paramters\n", "plt.figure()\n", "plt.plot(npars,X2_vals,'ro')\n", "plt.xlabel('npar')\n", "plt.ylabel(r'$\\chi^2$')\n", "plt.ylim(0,50)\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "How does $X^2$ change with the number of parameters? Can you use this to determine the best order of the fit? Why or why not?\n", "
\n", " ANSWER HERE: " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

AIC and BIC" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "One way to try to determine the most appropriate model is to use the Akaike Information Criterion:\n", "$$AIC = -2 ln(L_{max}) + 2 J$$\n", "where $L_{max}$ is the maximum likelihoold value, and $J$ is the number of parameters.\n", "\n", "Another is the Bayesian Information Criterion:\n", "$$BIC = -2 ln(L_{max}) + J ln(N)$$\n", "where $N$ is the number of data points.\n", "\n", "Supply routines to calculate ln(L), AIC, and BIC, for polynomial fits. Remember, for normally distributed uncertainties:\n", "$$L = \\prod {1\\over \\sqrt{2\\pi\\sigma_i}}exp{-0.5 (y_i - f(x_i|p)^2\\over \\sigma_i^2}$$\n", "$$ln(L) = \\sum {-0.5 (y_i - f(x_i|p)^2\\over \\sigma_i^2} + const$$\n", "Since we are looking to determine the minimum of AIC/BIC, we can ignore the constant." ] }, { "cell_type": "code", "execution_count": 39, "metadata": {}, "outputs": [], "source": [ "def logL(par,x,y,sig) :\n", " \"\"\" log(likelihood function)\n", " par are model parameters\n", " x,y,sig are observed data points and (Gaussian) uncertainties\n", " \"\"\"\n", " return np.sum(-0.5*(y-np.polyval(par,x))**2/sig**2) # fill in exporession for log(likelihood)\n", "\n", "def aic(par,x,y,sig) :\n", " \"\"\" Compute Akaike Information Criterion (AIC)\n", " \"\"\"\n", " J=len(par)\n", " N=len(x)\n", " return -2*logL(par,x,y,sig) + 2*J # fill in expression for AIC\n", "\n", "def bic(par,x,y,sig) :\n", " \"\"\" Compute Bayesian Information Criterion (BIC)\n", " \"\"\"\n", " J=len(par)\n", " N=len(x)\n", " return -2*logL(par,x,y,sig) + J*np.log(N) # fill in expression for BIC\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we will do fits of a range of polynomial orders, get the best fits, and compute AIC and BIC, then plot these against polynomial fit order." ] }, { "cell_type": "code", "execution_count": 40, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[3358.411678255502, 730.4743504820688, 44.34295347498924, 21.505403276197484, 21.337866894496372, 21.762226911607968, 20.862750741741078]\n" ] }, { "data": { "text/plain": [ "(0, 50)" ] }, "execution_count": 40, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3dd3xb1f3/8deRZMmS98hwHI/sHVbIJiEQIGUXAi3f0tI2kLZAaQNtGYXSUvqDlhKghBVmwgrQsspMSAnZezlxyDLZjh3vJWvd8/tDIjiJHSu2ZFn25/l4+GGNa93PjZ23r4/O5x6ltUYIIUT0MUW6ACGEEC0jAS6EEFFKAlwIIaKUBLgQQkQpCXAhhIhSlrbcWXp6us7NzW3LXQohRNRbt25dida6y/GPt2mA5+bmsnbt2rbcpRBCRD2l1N7GHpchFCGEiFIS4EIIEaUkwIUQIkpJgAshRJSSABdCiCglAS6EEFFKAlwIIaKUBLgQQkQpCXAhhAgnpfwfYSABLoQQ4eJwfHdbqWPvh4AEuBBChIPDAU7nsY85nSENcQlwIYQIh+PDu7nHW0ACXAghopQEuBBCRCkJcCGECDHt9WLExjb+pN0esv1IgAshRIiVv/Em23v3wbDZjn3Cboe6upDtRwJcCCFCyFtayqGnX+DI2J+ha2pB6+8+QhjeIAEuhBAhVTxzJkX9riMz5QxKt5aEdV8S4EIIESLOzZvZ/dVusrr1os5bjimlPqz7a9M1MYUQoqPShsH+B/+B97RLcFgcuM7UpGfnhHWfcgYuhBAhUPnuu+TTjz7xWRTHHGboNReFfZ8S4EII0Ure8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JcXMSHNr/Z2Bn4AyGpwvycn/ll1dBullAX/n14n+5OlvQvmmFFKTQb+CFyutXa1UW3h0twxJwBDgUVKqT34xwo/jOI3MoP9uf5Aa+3RWn8DbMcf6NEqmGOeBrwNoLVeAcTiv+hTRxbU//dgtbcAXwP0U0r1UkpZ8b9J+eFx23wI3BC4PRX4nw68OxClmj3mwHDCc/jDO9rHRqGZY9ZaV2qt07XWuVrrXPzj/pdrrddGptxWC+bn+n38b1ajlErHP6RS0KZVhlYwx7wPOB9AKTUIf4AfadMq296HwE8Cs1FGA5Va68IWv1qk37Vt4l3aHfjfwf5j4LEH8P8HBv83+R1gF7Aa6B3pmtvgmL8AioCNgY8PI11zuI/5uG0XEcWzUIL8HitgJpAP5AE/jHTNbXDMg4Fl+GeobAQujHTNITjmN4FCwIP/bHsa8Evglw2+z08F/k3yWvtzLa30QggRpdrbEIoQQoggSYALIUSUkgAXQogoJQEuhBBRSgJcCCGilAS4EEJEKQlwIYSIUv8fTP0E9UHqcLsAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD8CAYAAABuHP8oAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAARqklEQVR4nO3df4xdZZ3H8fe3P8xQhAB1bBrGMt0ES5WEChOUYJpdUFNXI6iwqZmVZoPpJsoG4xoX7B8bk0XlH/UfstkJdXc21KlsFSFm4y6hEFFZsEVYB1uCslOY5UdLhUAXu0r57h/3lG2nU+b+vvPceb+S5tzz3HPv+T5p+5lznnPOM5GZSJLKs6jXBUiSmmOAS1KhDHBJKpQBLkmFMsAlqVAGuCQVakk9G0XEFPAKcAR4LTNHIuIs4LvAMDAF/FlmvtiZMiVJMzVyBP4nmbkuM0eq9RuAezLzXOCeal2S1CWtDKFcAYxXr8eBK1svR5JUr6jnScyI+C/gRSCBf8jMsYh4KTPPOGabFzPzzFk+uxnYDHDqqadedN5557WteElaCHbv3v1CZg7ObK9rDBy4NDOfiYi3A3dHxN56d5yZY8AYwMjISO7atavej0qSgIjYN1t7XUMomflMtdwP3AFcDDwfESurL18J7G9PqZKkeswZ4BFxakScdvQ18CFgErgL2FRttgm4s1NFSpJOVM8Qygrgjog4uv13MvNHEfFz4PaIuBZ4Cri6c2VKkmaaM8Az80ngglnaDwKXd6IoSarHH/7wB6anpzl8+HCvS2mLgYEBhoaGWLp0aV3b13sRU5LmnenpaU477TSGh4epRgmKlZkcPHiQ6elpVq9eXddnfJReUrEOHz7M8uXLiw9vgIhg+fLlDZ1NGOCSitYP4X1Uo30xwNWwbdtgeBgWLaott23rdUXSwmSAqyHbtsHmzbBvH2TWlps3G+Ja2O644w4igr17a884Tk1Ncf7557/x/kMPPcT69etZs2YN5513Hp/5zGd49dVXW96vAa6GbNkCM//dvfpqrV2a9zp0+jgxMcH73/9+tm/ffsJ7zz//PFdffTU333wzjz/+OHv27GHDhg288sorLe/XAFdDnnqqsXZp3ujQ6eOhQ4f46U9/ytatW2cN8FtuuYVNmzZxySWXALVx7quuuooVK1a0tF8wwNWgVasaa5fmjQ6dPv7gBz9gw4YNvPOd7+Sss87i4YcfPu79yclJLrroopb2cTIGuBpy002wbNnxbcuW1dqlea1Dp48TExNs3LgRgI0bNzIxMdHS9zXCB3nUkNHR2nLLltq/+1WrauF9tF2at1atqg2bzNbepIMHD7Jz504mJyeJCI4cOUJE8NnPfvaNbd797neze/durrjiiqb3czIegatho6MwNQWvv15bGt4qQgdOH3fs2ME111zDvn37mJqa4umnn2b16tVMT0+/sc11113H+Pg4Dz744Bttt912G88991zT+z3KAJe0MIyOwtgYnHMORNSWY2MtHYFMTEzw8Y9//Li2T37yk3z1q199Y33FihVs376dL37xi6xZs4a1a9dy//33c/rppze936Pq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JJ9GHg4M59v55ca4F1SXfjbCuzJzG/0up5WRMRgRJxRvT4F+ACwt7dVNSczb8zMocwcpnaKuzMz/7zHZTUlIk6tLpBTDTl8CCju7q3MfA54OiLWVE2XA8Vd7J/hU7R5+ARam42wKyJiAvhj4G0RMQ38bWZu7W1VTbkU+DTwy2rsGODLmfmvPaypWSuB8eqq+iLg9sws+va7PrECuKN2rMAS4DuZ+aPeltS0vwK2VUMPTwJ/0eN6mhYRy4APAn/Z9u+e77cRSpJm5xCKJBXKAJekQhngklQoA1ySCmWAS1KhDHBJKpQBLkmF+j9+cLGm5/3A6QAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "# initialize accumulators\n", "aic_vals=[]\n", "bic_vals=[]\n", "chi2_vals=[]\n", "chi2prob_vals=[]\n", "\n", "# loop over polynomial fit orders\n", "npars=range(1,8)\n", "for npar in npars :\n", " \n", " # do the least squares fit exactly as above, just having you retype it so it perhaps sinks in better?\n", " design=np.vander(x,npar,increasing=False)\n", " C=np.diag(sig**2)\n", " Cinv=np.linalg.inv(C)\n", " # solve\n", " ATA=np.dot(np.dot(design.T,Cinv),design)\n", " par=np.linalg.solve(ATA,np.dot(np.dot(design.T,Cinv),y))\n", " \n", " #plot the fit\n", " plt.errorbar(x,y,sig,fmt='ro')\n", " xmod=np.arange(0,1,0.01)\n", " plt.plot(xmod,np.polyval(par,xmod))\n", " \n", " #calculate AIC and BIC\n", " aic_vals.append(aic(par,x,y,sig))\n", " bic_vals.append(bic(par,x,y,sig))\n", " #plt.ylim(0,20)\n", "\n", "\n", "print(aic_vals)\n", "plt.figure()\n", "plt.plot(npars,aic_vals,'ro',label='AIC')\n", "plt.plot(npars,bic_vals,'bo',label='BIC')\n", "plt.legend()\n", "plt.ylim(0,50)\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Based on AIC and BIC, which number of parameters would you choose? Does this match the number of parameters in the model that you used to generate the data set?\n", "
ANSWER HERE: " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

Cross validation\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "Another way to approach the problem is to consider whether a different data set, drawn from the same distribution, gives the same qualitative fit: if so, then perhaps the model is warranted, if not, then noise may be having a strong effect (overfitting). This is the basic idea behind cross-validation: develop a model from a subset of the data and judge it by how it performs against a different subset.\n", "\n", "Let's generate a different data set, and then split it into a training set and a cross-validation set. To generate the random sample for the training set, we can use numpy.random.shuffle(). Since we want to keep the (x,y) pairs together,we'll shuffle an array with the indices.\n" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[]" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXyU9bn38c8VQoBAEpaEnSSgoCC7EXGnoh431FO1lUbrnuPSqu1pT+tJT6lt85w+Li3a+tSmLmiNW9W61FptUVyq7FvYQUhCCJAAISRkIcn8nj8mCglZJpktk3zfrxevzNy5Z+7rJnDNL9dvM+ccIiISeaLCHYCIiHSMEriISIRSAhcRiVBK4CIiEUoJXEQkQkWH8mKJiYkuNTU1lJcUEYl4K1as2OecS2p6PKQJPDU1leXLl4fykiIiEc/M8ps7rhKKiEiEajOBm9nTZlZsZuuOOTbVzBab2WozW25mM4IbpoiINOVLC3wBcHGTYw8CDzjnpgI/bXguIiIh1GYCd859DBxoehiIb3icABQFOC4REWlDRzsx7wPeM7OH8X4InNnSiWaWAWQAJCcnd/ByIiLSVEc7Me8EvuecGwV8D3iqpROdc9nOuTTnXFpS0nGjYEREOo2c3BxS56cS9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OxCh2rznhnLCH/Am70ivjUIb9+ycK3POJTrnUp1zqXjr/lc45yJ1Q1Vf/l2/gbezGjNLxFtS2R7SKAPLl3suAGYDmNl4vAm8JKRRht5bwLcbRqPMBMqcc7s7/G7h7rVtoZd2C94e7MyGYz/H+x8YvD/kPwPbgKXAmHDHHIJ7/iewF1jd8OetcMcc7Htucu4iIngUio8/YwN+DWwAcoHrwh1zCO55AvAvvCNUVgMXhTvmANzzi8BuoBZva/tW4A7gjmN+zo83/J3k+vvvWlPpRUQiVGcroYiIiI+UwEVEIpQSuIhIhFICFxGJUErgIiIRSglcRCRCKYGLiESo/w9iSCM/ZdK36wAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "npts=30\n", "\n", "# simulate another data set\n", "xall=np.linspace(0,1,npts)\n", "sigall=2*np.ones(len(xall))\n", "truepars=[5,5,2,3]\n", "yall=np.polyval(truepars,xall)+np.random.normal(0,sig)\n", "\n", "# to choose a random sample, shuffle the indices with numpy.random.shuffle()\n", "indices=np.arange(npts)\n", "np.random.shuffle(indices)\n", "\n", "# create training set. Here's we'll use 70% of the data for the training set, and the remaining 30% for the cross validation\n", "ntrain=int(0.7*npts)\n", "# use indices[0:ntrain] of xall and yall\n", "xtrain=xall[indices[0:ntrain]]\n", "ytrain=yall[indices[0:ntrain]]\n", "sigtrain=sigall[indices[0:ntrain]]\n", "\n", "# create cross velidation set\n", "# use indices[ntrain:] (the remainder) for cross validation set\n", "xcv=xall[indices[ntrain:]]\n", "ycv=yall[indices[ntrain:]]\n", "sigcv=sigall[indices[ntrain:]]\n", "\n", "# plot training and cross-validation sets\n", "plt.plot(xtrain,ytrain,'ro')\n", "xmod=np.arange(0,1,0.01)\n", "plt.plot(xmod,np.polyval(truepars,xmod))\n", "plt.plot(xcv,ycv,'go')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we will again fit the initial data set, but we will evaluate the likelihood of the cross-validation set as well as the training set." ] }, { "cell_type": "code", "execution_count": 42, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 42, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD8CAYAAABuHP8oAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXhb1bnv8e+SrHiIR3lIbDmJBQmZEye2lUAgZWxDmzK0IUwFeuCQXmhpuJznlOmew+He9rm0D6VAGdowlHAbhpSZDpw2QJqS2UkMCRmbybEdEsdjHI+S1v1jy44cy0NsSVuy3s+DH1nSlvYrAj/tvHvttZTWGiGEENHHYnYBQgghBkcCXAghopQEuBBCRCkJcCGEiFIS4EIIEaUkwIUQIkrFDWQjpdQh4CTgAdxa62KllB14EygADgGLtdZ1oSlTCCHEmc7mCPwSrXWh1rrYd/8B4GOt9QTgY999IYQQYTKUFsrVwHLf78uBa4ZejhBCiIFSA7kSUyl1EKgDNPBbrfUypVS91jrdb5s6rXVGgNcuAZYAjBw5smjSpElBKz6QyvoW6ps7mJqX2vtG7jY4vhPSx0JSZkjrEUKIodqyZcsJrXX2mY8PqAcOzNNaVymlcoC/KaV2D3THWutlwDKA4uJiXVpaOtCXDsp72yq5980ylv/4QqbmpQXeyOuFnxfAtKvg20+FtB4hhBgqpdThQI8PqIWita7y3R4H3gVcwDGlVK7vzXOB48EpdWhcTjsAmw7W9r6RxQKO2VC5JUxVCSFE8PUb4EqpkUqplM7fga8DO4APgNt8m90GvB+qIs9GXnoi+RmJfQc4gKMIju2E9ubwFCaEEEE2kBbKKOBdpVTn9q9prT9SSm0GViql7gDKgetCV+bZcTnt/H1PNVprfHX3lF8M2gNHP4dx54e3QCGECIJ+A1xrfQCYGeDxGuCyUBQ1VK4CO+9sr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B6am5t77POGG25g5cqVPProoxw9epSqqiqKiopobGxkzZo1xMXFsWrVKh566CHefvvtXmtfunQpd911F7feeivPPvts1+MJCQm8++67pKamcuLECebOnctVV13VbepcoNusiZ2v3759O7t37+brX/86e/fuBaCsrIxt27YRHx/PxIkTueeeexgzZkww/vULIYYgsgK8nyPlUPjkk09YtGhR1wIKdrsdgOuuu65rRZ7PPvusK0gvvfRSampqaGhoYN68edx3333cfPPNfOc73yE/P5+SkhJuv/12Ojo6uOaaa7qmmfW3ePFirrjiCh599FFWrlzJddddBxiTZ912223s27cPpRQdHR191r527dquum655Rbuv/9+wJjh8KGHHmLNmjVYLBYqKys5duxYn+/12Wefcc899wAwadIkxo0b1xXgl112GWlpxqT2U6ZM4fDhwxLgQkSAmO+Ba60DLlbqP61soPlilFI88MADvPjii7S0tDB37lx2797N/PnzWbNmDQ6Hg1tuuYVXX32Vd999l8LCQgoLCyktLcXhcJCZmckXX3zBm2++yQ033ADAf/zHf3DJJZewY8cOPvzww4BT1waq40wrVqygurqaLVu2UFZWxqhRo/p9r77mxDlzutxIOy8gRKyK+QC/7LLLWLlyJTU1NQDU1tb22Gb+/PmsWLECMEaEZGVlkZqayv79+5k+fTr3338/xcXF7N69m8OHD5OTk8Odd97JHXfcwdatW7n22mspKyujrKyM4mJjPpobbriBX/ziFzQ0NDB9+nTAOAJ3OByA0evuz7x583jjjTcAuurrfJ+cnBxsNhuffvophw8byz31NXWu/2fcu3cv5eXlPfrvQojIEvMBPnXqVB5++GG+9rWvMXPmTO67774e2/zXf/0XpaWlzJgxgwceeIDly5cD8OSTTzJt2jRmzpxJYmIiV155JatXr6awsJBZs2bx9ttvd53kPNOiRYt44403WLx4cddjP/nJT3jwwQeZN28eHo+n39qfeuopnn32WUpKSmhoaOh6/Oabb6a0tJTi4mJWrFjBpEmTgO5T5/77v/97t/e6++678Xg8TJ8+neuvv55XXnml25G3ECLyyHSyImjkz1KI0OhtOtmYPwIXQohoJQEuhBBRKiICXBb2jX7yZyhE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8DK7TW75hdTzD4/mq7GlhgcimDNQ+4ytc7fgO4VCn1e3NLGjytdZXv9jjwLsasodGmAqjw+1vdWxiBHs2uBLZqrY8F800lwMPEd+LvJWCX1voJs+sZCqVUtlIq3fd7InA5sNvcqgZHa/2g1jpfa12A8VfcT7TW3zO5rEFRSo30nSDH13L4OhB1o7e01l8BR5RSE30PXQZE3cn+M9xIkNsnEAFLqvVHKfU6cDGQpZSqAB7RWr9kblWDMg+4Bdju6x0DPKS1/rOJNQ1WLrDcd1bdAqzUWkf18LthYhTwrnGsQBzwmtb6I3NLGrR7gBW+1sMB4F9MrmfQlFJJwBXAD4L+3pE+jFAIIURg0kIRQogoJQEuhBBRSgJcCCGilAS4EEJEKQlwIYSIUhLgQggRpSTAhRAiSv1/si/eF04jLfwAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "#initialize lists to save the X2 values\n", "X2_vals=[]\n", "X2_cv_vals=[]\n", "\n", "# loop over different number of parameters in the fit, using the training set only to do the fit\n", "for npar in npars :\n", " design=np.vander(xtrain,npar,increasing=False)\n", " C=np.diag(sigtrain**2)\n", " Cinv=np.linalg.inv(C)\n", "\n", " # solve\n", " ATA=np.dot(np.dot(design.T,Cinv),design)\n", " par=np.linalg.solve(ATA,np.dot(np.dot(design.T,Cinv),ytrain))\n", "\n", " # calculate X2 for the training set\n", " X2=np.sum((ytrain-np.polyval(par,xtrain))**2/sigtrain**2)\n", " X2_vals.append(X2)\n", " \n", " # calculate X2 for the cross validation set\n", " X2_cv=np.sum((ycv-np.polyval(par,xcv))**2/sigcv**2)\n", " X2_cv_vals.append(X2_cv)\n", "\n", "# plot the X2 values for both sets as a function of hte number of paramters\n", "plt.plot(npars,X2_vals,label='training')\n", "plt.plot(npars,X2_cv_vals,label='cross-validation')\n", "# may need to adjust limits to see the minima well\n", "plt.ylim(0,50)\n", "plt.legend()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "How do the training and cross-validation values of $X^2$ change with the number of paramters? How does this indicate what an appropriate number of parameters to use for the fit is?\n", "
\n", " ANSWER HERE: " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

Regularization" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Yet another approach is to use regularization in a fit with more parameters/flexibility.\n", "\n", "For ridge regression, it turns out that the regularized solution just requires a small modification to the least squares solution:\n", "\n", "$$ pars = (A^T C^{-1} A + λI)^{-1} A^T C^{-1} y$$\n", "where $I$ is the identity matrix.\n", "\n", "But, first we need to standardize the independent variable so that it is centered on zero, and has quantities near unity, i.e. transform to:\n", "$$x' = {(x-)\\over\\sigma_x}$$" ] }, { "cell_type": "code", "execution_count": 43, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[]" ] }, "execution_count": 43, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAATWElEQVR4nO3dfYxld13H8c9nWVscFCjslALtzFADyEMIsFdSiuLaotnUpsUISZshLopOCj4SEUs2odFkoyBRMYpmhLUlO1keaoFKqLQWof/Y4t3aslsWKODusrR2p1SruJEH9+sf54w7e/c+33PuOb9z369kcu+ce+ae75zdfObc7/md83NECACQni1VFwAAGA8BDgCJIsABIFEEOAAkigAHgERtnebGtm3bFktLS9PcJAAk78CBA49GxHzn8qkG+NLSktrt9jQ3CQDJs32023JaKACQqIEBbnuv7RO2D21a9lLbd9u+z3bb9ivKLRMA0GmYI/AbJe3sWPZuSb8XES+V9M78ewDAFA0M8Ii4S9JjnYslPTl//hRJDxVcFwBggHFPYv6WpE/bfo+yPwKX9lrR9oqkFUlaWFgYc3MAgE7jnsR8s6S3RsRFkt4q6QO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G5+U7X+QdEGXl3ZHxCeGfJtXRcRDts+XdIftL+V/hUtRQM3djgZLHwvar+4R3mYh39cXS/qM7YMR8bViKhzKMPuukv3bxzD1/J2k/RHxHdvXKfsEcVnplU2mbvt5WPcquy/Jt21fIenjkp5bVTFJB3hEvKaA93gofzxh+2PKPrKWFuAF1Hxc0uYjrAslPTThew7Ur27bj9h+ZkQ8nH8MPtHjPTb29ddtf1bSy5T1d6dlmH23sc5x21slPUXVfqQeWHNEfGvTt38t6V1TqGtSlfw/nlRE/Oem55+y/T7b2yKikptczXQLxfaTbP/wxnNJPyOp69nnGvlnSc+1/Rzb5yg70VbJiI5NbpW0K3++S9JZnyRsn2f73Pz5NkmvkvTFqVWYGWbfbf5dXifpM5GfvarIwJo7esdXSTo8xfrGdaukX8hHo1wi6fGNNlyd2b5g45yI7Vcoy9Bv9f+pElV9FrWsL0k/p+yv/HckPSLp0/nyZ0n6VP78YmVn9e+X9ICyNkata86/v0LSV5QdvVZac17P0yXdKenB/PFp+fKWpPfnzy+VdDDf1wclvamiWs/ad5J+X9JV+fMnSvqopK9K+ryki2uwfwfV/Af5/9/7Jf2jpB+tQc37JT0s6Xv5/+k3SbpO0nX565b0F/nvdFB9RorVrO5f27Sv75Z0aZX1cik9ACRqplsoAJAyAhwAEkWAA0CiCHAASBQBDgCJIsABIFEEOAAk6v8AJWaEhCansVYAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "npts=30\n", "xx=(xall-xall.mean())/xall.std() # fill in expression for normalized independent variable\n", "\n", "# plot data vs normalized independent variable\n", "plt.plot(xx,yall,'ro')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we will try a range of regularized fits with different regularization parameters, using a high order fit. We will print out the values of the parameters. Here, we will use our full data set." ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[-1.0678 -0.42 4.6487 1.6739 -5.495 -0.3852 5.2785 5.5803]\n", "[-0.3333 -0.2241 0.8835 0.7924 0.1766 0.7006 2.9521 5.2562]\n", "[-0.3057 -0.2023 0.6864 0.6675 0.635 0.9443 2.6088 5.0878]\n", "[-0.3078 -0.2018 0.6562 0.6416 0.8074 1.0641 2.4062 4.9505]\n", "[-0.3143 -0.2066 0.6616 0.6441 0.8969 1.1395 2.2587 4.8291]\n", "[-0.3209 -0.2124 0.6763 0.6568 0.9504 1.1925 2.1423 4.7188]\n", "[-0.3264 -0.2181 0.6925 0.6729 0.9847 1.232 2.0465 4.6172]\n", "[-0.3307 -0.2231 0.7078 0.6899 1.0075 1.2625 1.9653 4.5228]\n", "[-0.3338 -0.2273 0.7213 0.7065 1.0229 1.2864 1.8952 4.4344]\n", "[-0.336 -0.2307 0.733 0.722 1.0331 1.3053 1.8336 4.3513]\n" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nOzdd3zV9b3H8df37JFzMk8G2QkZhA0BGQJOQEXcW+uq9tra1tbWbm17a7WO2vZ622qtdQ9EUFAQUQREEAwzISFkkb33PDnjd/+AXiuyyebzfDx4QH75nd/vcxJ955vv7zuUpmkIIYQYfnSDXYAQQohTIwEuhBDDlAS4EEIMUxLgQggxTEmACyHEMGUYyJuFhYVpCQkJA3lLIYQY9rZv396gaZrr8OMDGuAJCQlkZWUN5C2FEGLYU0qVHum4dKEIIcQwddwAV0o9r5SqU0rl/MexSUqpz5VSu5RSWUqp6f1bphBCiMOdSAv8BWDhYcceA36jadok4MFDHwshhBhAxw1wTdM2Ak2HHwach/4dCFT1cV1CCCGO41QfYt4HrFFKPcHBHwKzjnaiUupu4G6AuLi4U7yd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A/saTJ/CNhK7b66i4BduTMXzL0U+CR3ztFHz/bAI2JfROzPnWMsCmZeCByMiMMR8SfwLrBi8tO1tAJYn6bXA/dnzNJKkbar35ZNwN1So7tgl6Yb/95tRcRXwO8tFlkBvB01O4ErJM0tJ11zBXJ3lZ4t4GMQwGeSvpP0RO4wBVwD/Fr3+mh6L6erIuI4QHqe3WS56ZJ2S9opKUeRL9J2/y8TEX8DZ4BZpaRrrOjf+8E0FLFJ0nXlROtIN36Oi7pT0rCkrZJuzxmk0nfkkfQ5MKfBrKcj4qOCq1kSEcckzQa2Sfo5fQtPignI3Kg3OOnngrbKPYbVXJ/aehDYLmkkIg5NTMJCirRdlvZtoUiej4ENEXFO0hpqexDLJj1ZZ7qtnYv6ntp1Sc5KGgI+BOblClPpAh4R90zAOo6l55OSPqC2yzppBXwCMh8F6ntY1wLHOlxnW61ySzohaW5EHE+7wSebrGO0rQ9L2gHcQW18tyxF2m50maOSpgCXk3eXum3miDhd9/J1YF0JuTqV5XPcqYj4o256i6RXJA1ERJaLXPX1EIqkSyVdNjoN3As0PPrcRb4F5km6SdJUagfaspzRUWczsDJNrwQu2pOQNEPStDQ9ACwBfiotYU2RtqvfloeA7ZGOXmXSNvMFY8fLgX0l5huvzcBj6WyURcCZ0WG4biZpzugxEUkLqdXQ061/ahLlPoo6WQ/gAWrf8ueAE8Cn6f2rgS1pepDaUf1hYC+1YYyuzpxeDwG/UOu9Zs2c8swCvgAOpOeZ6f0FwBtpejEwktp6BFidKetFbQc8CyxP09OB94CDwDfAYBe0b7vMz6XP7zDwJXBLF2TeABwH/kqf6dXAGmBNmi/g5bRNI7Q4U6zLcj9V19Y7gcU58/pf6c3MKqqvh1DMzKrMBdzMrKJcwM3MKsoF3MysolzAzcwqygXczKyiXMDNzCrqPxpePuH7MG2ZAAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "# order of model to fit\n", "npar=8\n", "\n", "# loop over regularization parameter values\n", "for lam in np.arange(0.,1,0.1):\n", " \n", " design=np.vander(xx,npar,increasing=False)\n", " C=np.diag(sigall**2)\n", " Cinv=np.linalg.inv(C)\n", " # solve\n", " ATA=np.dot(np.dot(design.T,Cinv),design)+np.diag(lam*np.ones(npar)) # this is where the regularization comes in\n", " pars=np.linalg.solve(ATA,np.dot(np.dot(design.T,Cinv),yall))\n", "\n", " # set number of digits to print\n", " np.set_printoptions(precision=4,suppress=True)\n", " print(pars)\n", " \n", " # plot the fit\n", " plt.plot(xx,yall,'ro')\n", " xmod=np.arange(0,1,0.01)\n", " xxmod=(xmod-x.mean())/x.std()\n", " plt.plot(xxmod,np.polyval(pars,xxmod))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "How does increasing the value of the regularization parameter $\\lambda$ affect the values of the parameters? How does it affect the shape of the fit?\n", "
\n", " ANSWER HERE: " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "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.7.11" } }, "nbformat": 4, "nbformat_minor": 2 }