{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "# Data Analysis and Machine Learning: Introduction and Representing data\n", "\n", " \n", "**Morten Hjorth-Jensen**, Department of Physics, University of Oslo and Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University\n", "\n", "Date: **Dec 8, 2017**\n", "\n", "Copyright 1999-2017, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license\n", "\n", "\n", "\n", "\n", "## What is Machine Learning?\n", "\n", "Machine learning is the science of giving computers the ability to\n", "learn without being explicitly programmed. The idea is that there\n", "exist generic algorithms which can be used to find patterns in a broad\n", "class of data sets without having to write code specifically for each\n", "problem. The algorithm will build its own logic based on the data.\n", "\n", "Machine learning is a subfield of computer science, and is closely\n", "related to computational statistics. It evolved from the study of\n", "pattern recognition in artificial intelligence (AI) research, and has\n", "made contributions to AI tasks like computer vision, natural language\n", "processing and speech recognition. It has also, especially in later\n", "years, found applications in a wide variety of other areas, including\n", "bioinformatics, economy, physics, finance and marketing.\n", "\n", "## Types of Machine Learning\n", "\n", "\n", "The approaches to machine learning are many, but are often split into two main categories. \n", "In *supervised learning* we know the answer to a problem,\n", "and let the computer deduce the logic behind it. On the other hand, *unsupervised learning*\n", "is a method for finding patterns and relationship in data sets without any prior knowledge of the system.\n", "Some authours also operate with a third category, namely *reinforcement learning*. This is a paradigm \n", "of learning inspired by behavioural psychology, where learning is achieved by trial-and-error, \n", "solely from rewards and punishment.\n", "\n", "Another way to categorize machine learning tasks is to consider the desired output of a system.\n", "Some of the most common tasks are:\n", "\n", " * Classification: Outputs are divided into two or more classes. The goal is to produce a model that assigns inputs into one of these classes. An example is to identify digits based on pictures of hand-written ones. Classification is typically supervised learning.\n", "\n", " * Regression: Finding a functional relationship between an input data set and a reference data set. The goal is to construct a function that maps input data to continuous output values.\n", "\n", " * Clustering: Data are divided into groups with certain common traits, without knowing the different groups beforehand. It is thus a form of unsupervised learning.\n", "\n", "## Different algorithms\n", "In this course we will build our machine learning approach on a statistical foundation, with elements \n", "from data analysis, stochastic processes etc before we proceed with the following machine learning algorithms\n", "\n", "1. Linear regression and its variants\n", "\n", "2. Decision tree algorithms, from simpler to more complex ones\n", "\n", "3. Nearest neighbors models\n", "\n", "4. Bayesian statistics \n", "\n", "5. Support vector machines and finally various variants of\n", "\n", "6. Artifical neural networks\n", "\n", "Before we proceed however, there are several practicalities with data analysis and software tools we would \n", "like to present. These tools will help us in our understanding of various machine learning algorithms. \n", "\n", "Our emphasis here is on understanding the mathematical aspects of different algorithms, however, where possible \n", "we will emphasize the importance of using available software. \n", "\n", "\n", "## Software and needed installations\n", "We will make intensive use of python as programming language and the myriad of available libraries. \n", "Furthermore, you will find IPython/Jupyter notebooks invaluable in your work. \n", "You can run **R** codes in the Jupyter/IPython notebooks, with the immediate benefit of visualizing your data.\n", "\n", "\n", "If you have Python installed (we recommend Python3) and you feel pretty familiar with installing different packages, \n", "we recommend that you install the following Python packages via **pip** as\n", "1. pip install numpy scipy matplotlib ipython scikit-learn mglearn sympy pandas pillow\n", "\n", "For Python3, replace **pip** with **pip3**.\n", "\n", "For OSX users we recommend also, after having installed Xcode, to install **brew**. Brew allows \n", "for a seamless installation of additional software via for example\n", "1. brew install python3\n", "\n", "For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution\n", "you can use **pip** as well and simply install Python as \n", "1. sudo apt-get install python3 (or python for pyhton2.7)\n", "\n", "etc etc. \n", "\n", "## Python installers\n", "If you don't want to perform these operations separately, we recommend two widely used distrubutions which set up \n", "all relevant dependencies for Python, namely\n", "1. [Anaconda](https://docs.anaconda.com/) Anaconda is an open source distribution of the Python and R programming languages for large-scale data processing, predictive analytics, and scientific computing, that aims to simplify package management and deployment. Package versions are managed by the package management system **conda**\n", "\n", "2. [Enthought canopy](https://www.enthought.com/product/canopy/) is a Python distribution for scientific and analytic computing distribution and analysis environment, available for free and under a commercial license.\n", "\n", "## Installing R, C++, cython or Julia\n", "\n", "You will also find it convenient to utilize R. \n", "Jupyter/Ipython notebook allows you run **R** code interactively in your browser. The software library **R** is \n", "tuned to statistically analysis and allows for an easy usage of the tools we will discuss in these texts.\n", "\n", "To install **R** with Jupyter notebook [following the link here](https://mpacer.org/maths/r-kernel-for-ipython-notebook)\n", "\n", "\n", "\n", "## Installing R, C++, cython or Julia\n", "\n", "\n", "For the C++ affecianodas, Jupyter/IPython notebook allows you also to install C++ and run codes written in this language \n", "interactively in the browser. Since we will emphasize writing many of the algorithms yourself, you can thus opt for\n", "either Python or C++ as programming languages. \n", "\n", "To add more entropy, **cython** can also be used when running your notebooks. It means that Python with the Jupyter/IPython notebook \n", "setup allows you to integrate widely popular softwares and tools for scientific computing. With its versatility, \n", "including symbolic operations, Python offers a unique computational environment. Your Jupyter/IPython notebook \n", "can easily be converted into a nicely rendered **PDF** file or a Latex file for further processing. For example, convert to latex as" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "jupyter nbconvert filename.ipynb --to latex" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If you use the light mark-up language **doconce** you can convert a standard ascii text file into various HTML \n", "formats, ipython notebooks, latex files, pdf files etc. \n", "\n", "\n", "\n", "## Introduction to Jupyter notebook and available tools" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "from scipy import sparse\n", "import pandas as pd\n", "from IPython.display import display\n", "eye = np.eye(4)\n", "print(eye)\n", "sparse_mtx = sparse.csr_matrix(eye)\n", "print(sparse_mtx)\n", "x = np.linspace(-10,10,100)\n", "y = np.sin(x)\n", "plt.plot(x,y,marker='x')\n", "plt.show()\n", "data = {'Name': [\"John\", \"Anna\", \"Peter\", \"Linda\"], 'Location': [\"Nairobi\", \"Napoli\", \"London\", \"Buenos Aires\"], 'Age':[51, 21, 34, 45]}\n", "data_pandas = pd.DataFrame(data)\n", "display(data_pandas)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Representing data, more examples" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "from scipy import sparse\n", "import pandas as pd\n", "from IPython.display import display\n", "import mglearn\n", "import sklearn\n", "from sklearn.linear_model import LinearRegression\n", "from sklearn.tree import DecisionTreeRegressor\n", "x, y = mglearn.datasets.make_wave(n_samples=100)\n", "line = np.linspace(-3,3,1000,endpoint=False).reshape(-1,1)\n", "reg = DecisionTreeRegressor(min_samples_split=3).fit(x,y)\n", "plt.plot(line, reg.predict(line), label=\"decision tree\")\n", "regline = LinearRegression().fit(x,y)\n", "plt.plot(line, regline.predict(line), label= \"Linear Rgression\")\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Predator-Prey model from ecology\n", "\n", "The population dynamics of a simple predator-prey system is a\n", "classical example shown in many biology textbooks when ecological\n", "systems are discussed. The system contains all elements of the\n", "scientific method:\n", "\n", " * The set up of a specific hypothesis combined with\n", "\n", " * the experimental methods needed (one can study existing data or perform experiments)\n", "\n", " * analyzing and interpreting the data and performing further experiments if needed\n", "\n", " * trying to extract general behaviors and extract eventual laws or patterns\n", "\n", " * develop mathematical relations for the uncovered regularities/laws and test these by per forming new experiments\n", "\n", "\n", "\n", "\n", "## Case study from Hudson bay\n", "\n", "Lots of data about populations of hares and lynx collected from furs in Hudson Bay, Canada, are available. It is known that the populations oscillate. Why?\n", "Here we start by\n", "\n", "1. plotting the data\n", "\n", "2. derive a simple model for the population dynamics\n", "\n", "3. (fitting parameters in the model to the data)\n", "\n", "4. using the model predict the evolution other predator-pray systems\n", "\n", "\n", "\n", "## Hudson bay data\n", "\n", "\n", "\n", "Most mammalian predators rely on a variety of prey, which complicates mathematical modeling; however, a few predators have become highly specialized and seek almost exclusively a single prey species. An example of this simplified predator-prey interaction is seen in Canadian northern forests, where the populations of the lynx and the snowshoe hare are intertwined in a life and death struggle.\n", "\n", "One reason that this particular system has been so extensively studied is that the Hudson Bay company kept careful records of all furs from the early 1800s into the 1900s. The records for the furs collected by the Hudson Bay company showed distinct oscillations (approximately 12 year periods), suggesting that these species caused almost periodic fluctuations of each other's populations. The table here shows data from 1900 to 1920.\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
Year Hares (x1000) Lynx (x1000)
1900 30.0 4.0
1901 47.2 6.1
1902 70.2 9.8
1903 77.4 35.2
1904 36.3 59.4
1905 20.6 41.7
1906 18.1 19.0
1907 21.4 13.0
1908 22.0 8.3
1909 25.4 9.1
1910 27.1 7.4
1911 40.3 8.0
1912 57 12.3
1913 76.6 19.5
1914 52.3 45.7
1915 19.5 51.1
1916 11.2 29.7
1917 7.6 15.8
1918 14.6 9.7
1919 16.2 10.1
1920 24.7 8.6
\n", "\n", "\n", "\n", "\n", "\n", "## Plotting the data" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import numpy as np\n", "from matplotlib import pyplot as plt\n", "\n", "# Load in data file\n", "data = np.loadtxt('src/Hudson_Bay.csv', delimiter=',', skiprows=1)\n", "# Make arrays containing x-axis and hares and lynx populations\n", "year = data[:,0]\n", "hares = data[:,1]\n", "lynx = data[:,2]\n", "\n", "plt.plot(year, hares ,'b-+', year, lynx, 'r-o')\n", "plt.axis([1900,1920,0, 100.0])\n", "plt.xlabel(r'Year')\n", "plt.ylabel(r'Numbers of hares and lynx ')\n", "plt.legend(('Hares','Lynx'), loc='upper right')\n", "plt.title(r'Population of hares and lynx from 1900-1920 (x1000)}')\n", "plt.savefig('Hudson_Bay_data.pdf')\n", "plt.savefig('Hudson_Bay_data.png')\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Hares and lynx in Hudson bay from 1900 to 1920\n", "\n", "\n", "\n", "\n", "

\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "## Why now create a computer model for the hare and lynx populations?\n", "We see from the plot that there are indeed fluctuations.\n", "We would like to create a mathematical model that explains these\n", "population fluctuations. Ecologists have predicted that in a simple\n", "predator-prey system that a rise in prey population is followed (with\n", "a lag) by a rise in the predator population. When the predator\n", "population is sufficiently high, then the prey population begins\n", "dropping. After the prey population falls, then the predator\n", "population falls, which allows the prey population to recover and\n", "complete one cycle of this interaction. Thus, we see that\n", "qualitatively oscillations occur. Can a mathematical model predict\n", "this? What causes cycles to slow or speed up? What affects the\n", "amplitude of the oscillation or do you expect to see the oscillations\n", "damp to a stable equilibrium? The models tend to ignore factors like\n", "climate and other complicating factors. How significant are these?\n", "\n", " * We see oscillations in the data\n", "\n", " * What causes cycles to slow or speed up?\n", "\n", " * What affects the amplitude of the oscillation or do you expect to see the oscillations damp to a stable equilibrium?\n", "\n", " * With a model we can better *understand the data*\n", "\n", " * More important: we can understand the ecology dynamics of\n", " predator-pray populations\n", "\n", "\n", "\n", "\n", "## The traditional (top-down) approach\n", "\n", "The classical way (in all books) is to present the Lotka-Volterra equations:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$$\n", "\\begin{align*}\n", "\\frac{dH}{dt} &= H(a - b L)\\\\\n", "\\frac{dL}{dt} &= - L(d - c H)\n", "\\end{align*}\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here,\n", "\n", " * $H$ is the number of preys\n", "\n", " * $L$ the number of predators\n", "\n", " * $a$, $b$, $d$, $c$ are parameters\n", "\n", "Most books quickly establish the model and then use considerable space on\n", "discussing the qualitative properties of this *nonlinear system of\n", "ODEs* (which cannot be solved)\n", "\n", "\n", "\n", "\n", "\n", "## Basic mathematics notation\n", " * Time points: $t_0,t_1,\\ldots,t_m$\n", "\n", " * Uniform distribution of time points: $t_n=n\\Delta t$\n", "\n", " * $H^n$: population of hares at time $t_n$\n", "\n", " * $L^n$: population of lynx at time $t_n$\n", "\n", " * We want to model the changes in populations, $\\Delta H=H^{n+1}-H^n$\n", " and $\\Delta L=L^{n+1}-L^n$ during a general time interval $[t_{n+1},t_n]$\n", " of length $\\Delta t=t_{n+1}-t_n$\n", "\n", "\n", "\n", "## Basic dynamics of the population of hares\n", "\n", "The population of hares evolves due to births and deaths exactly as a bacteria population:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$$\n", "\\Delta H = a \\Delta t H^n\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "However, hares have an additional loss in the population because\n", "they are eaten by lynx.\n", "All the hares and lynx can form\n", "$H\\cdot L$ pairs in total. When such pairs meet during a time\n", "interval $\\Delta t$, there is some\n", "small probablity that the lynx will eat the hare.\n", "So in fraction $b\\Delta t HL$, the lynx eat hares. This\n", "loss of hares must be accounted for. Subtracted in the equation for hares:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$$\n", "\\Delta H = a\\Delta t H^n - b \\Delta t H^nL^n\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Basic dynamics of the population of lynx\n", "\n", "We assume that the primary growth for the lynx population depends on sufficient food for raising lynx kittens, which implies an adequate source of nutrients from predation on hares. Thus, the growth of the lynx population does not only depend of how many lynx there are, but on how many hares they can eat.\n", "In a time interval $\\Delta t HL$ hares and lynx can meet, and in a\n", "fraction $b\\Delta t HL$ the lynx eats the hare. All of this does not\n", "contribute to the growth of lynx, again just a fraction of\n", "$b\\Delta t HL$ that we write as\n", "$d\\Delta t HL$. In addition, lynx die just as in the population\n", "dynamics with one isolated animal population, leading to a loss\n", "$-c\\Delta t L$.\n", "\n", "\n", "\n", "The accounting of lynx then looks like" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$$\n", "\\Delta L = d\\Delta t H^nL^n - c\\Delta t L^n\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Evolution equations\n", "\n", "By writing up the definition of $\\Delta H$ and $\\Delta L$, and putting\n", "all assumed known terms $H^n$ and $L^n$ on the right-hand side, we have" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$$\n", "H^{n+1} = H^n + a\\Delta t H^n - b\\Delta t H^n L^n\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$$\n", "L^{n+1} = L^n + d\\Delta t H^nL^n - c\\Delta t L^n\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note:\n", "\n", " * These equations are ready to be implemented!\n", "\n", " * But to start, we need $H^0$ and $L^0$ \n", " (which we can get from the data)\n", "\n", " * We also need values for $a$, $b$, $d$, $c$\n", "\n", "\n", "\n", "## Adapt the model to the Hudson Bay case\n", "\n", " * As always, models tend to be general - as here, applicable\n", " to \"all\" predator-pray systems\n", "\n", " * The critical issue is whether the *interaction* between hares and lynx\n", " is sufficiently well modeled by $\\hbox{const}HL$\n", "\n", " * The parameters $a$, $b$, $d$, and $c$ must be\n", " estimated from data\n", "\n", " * Measure time in years\n", "\n", " * $t_0=1900$, $t_m=1920$\n", "\n", "\n", "\n", "## The program" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "def solver(m, H0, L0, dt, a, b, c, d, t0):\n", " \"\"\"Solve the difference equations for H and L over m years\n", " with time step dt (measured in years.\"\"\"\n", "\n", " num_intervals = int(m/float(dt))\n", " t = np.linspace(t0, t0 + m, num_intervals+1)\n", " H = np.zeros(t.size)\n", " L = np.zeros(t.size)\n", "\n", " print('Init:', H0, L0, dt)\n", " H[0] = H0\n", " L[0] = L0\n", "\n", " for n in range(0, len(t)-1):\n", " H[n+1] = H[n] + a*dt*H[n] - b*dt*H[n]*L[n]\n", " L[n+1] = L[n] + d*dt*H[n]*L[n] - c*dt*L[n]\n", " return H, L, t\n", "\n", "# Load in data file\n", "data = np.loadtxt('src/Hudson_Bay.csv', delimiter=',', skiprows=1)\n", "# Make arrays containing x-axis and hares and lynx populations\n", "t_e = data[:,0]\n", "H_e = data[:,1]\n", "L_e = data[:,2]\n", "\n", "# Simulate using the model\n", "H, L, t = solver(m=20, H0=34.91, L0=3.857, dt=0.1,\n", " a=0.4807, b=0.02482, c=0.9272, d=0.02756,\n", " t0=1900)\n", "\n", "# Visualize simulations and data\n", "plt.plot(t_e, H_e, 'b-+', t_e, L_e, 'r-o', t, H, 'm--', t, L, 'k--')\n", "plt.xlabel('Year')\n", "plt.ylabel('Numbers of hares and lynx')\n", "plt.axis([1900, 1920, 0, 140])\n", "plt.title(r'Population of hares and lynx 1900-1920 (x1000)')\n", "plt.legend(('H_e', 'L_e', 'H', 'L'), loc='upper left')\n", "plt.savefig('Hudson_Bay_sim.pdf')\n", "plt.savefig('Hudson_Bay_sim.png')\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The plot\n", "\n", "\n", "\n", "\n", "

\n", "\n", "\n", "\n", "\n", "\n", "If we perform a least-square fitting, we can find optimal values for the parameters $a$, $b$, $d$, $c$. The optimal parameters are $a=0.4807$, $b=0.02482$, $d=0.9272$ and $c=0.02756$. These parameters result in a slightly modified initial conditions, namely $H(0) = 34.91$ and $L(0)=3.857$. With these parameters we are now ready to solve the equations and plot these data together with the experimental values.\n", "\n", "\n", "## Linear regression in Python" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "from IPython.display import display\n", "import sklearn\n", "from sklearn.linear_model import LinearRegression\n", "from sklearn.tree import DecisionTreeRegressor\n", "\n", "\n", "data = np.loadtxt('src/Hudson_Bay.csv', delimiter=',', skiprows=1)\n", "x = data[:,0]\n", "y = data[:,1]\n", "line = np.linspace(1900,1920,1000,endpoint=False).reshape(-1,1)\n", "reg = DecisionTreeRegressor(min_samples_split=3).fit(x.reshape(-1,1),y.reshape(-1,1))\n", "plt.plot(line, reg.predict(line), label=\"decision tree\")\n", "regline = LinearRegression().fit(x.reshape(-1,1),y.reshape(-1,1))\n", "plt.plot(line, regline.predict(line), label= \"Linear Regression\")\n", "plt.plot(x, y, label= \"Linear Regression\")\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Linear Least squares in R" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " HudsonBay = read.csv(\"src/Hudson_Bay.csv\",header=T)\n", " fix(HudsonBay)\n", " dim(HudsonBay)\n", " names(HudsonBay)\n", " plot(HudsonBay$Year, HudsonBay$Hares..x1000.)\n", " attach(HudsonBay)\n", " plot(Year, Hares..x1000.)\n", " plot(Year, Hares..x1000., col=\"red\", varwidth=T, xlab=\"Years\", ylab=\"Haresx 1000\")\n", " summary(HudsonBay)\n", " summary(Hares..x1000.)\n", " library(MASS)\n", " library(ISLR)\n", " scatter.smooth(x=Year, y = Hares..x1000.)\n", " linearMod = lm(Hares..x1000. ~ Year)\n", " print(linearMod)\n", " summary(linearMod)\n", " plot(linearMod)\n", " confint(linearMod)\n", " predict(linearMod,data.frame(Year=c(1910,1914,1920)),interval=\"confidence\")\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Non-Linear Least squares in R" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " set.seed(1485)\n", " len = 24\n", " x = runif(len)\n", " y = x^3+rnorm(len, 0,0.06)\n", " ds = data.frame(x = x, y = y)\n", " str(ds)\n", " plot( y ~ x, main =\"Known cubic with noise\")\n", " s = seq(0,1,length =100)\n", " lines(s, s^3, lty =2, col =\"green\")\n", " m = nls(y ~ I(x^power), data = ds, start = list(power=1), trace = T)\n", " class(m)\n", " summary(m)\n", " power = round(summary(m)$coefficients[1], 3)\n", " power.se = round(summary(m)$coefficients[2], 3)\n", " plot(y ~ x, main = \"Fitted power model\", sub = \"Blue: fit; green: known\")\n", " s = seq(0, 1, length = 100)\n", " lines(s, s^3, lty = 2, col = \"green\")\n", " lines(s, predict(m, list(x = s)), lty = 1, col = \"blue\")\n", " text(0, 0.5, paste(\"y =x^ (\", power, \" +/- \", power.se, \")\", sep = \"\"), pos = 4)\n" ] } ], "metadata": {}, "nbformat": 4, "nbformat_minor": 2 }