/
index.html
93 lines (92 loc) · 5.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<title>Fitting models with scipy.optimize</title>
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="css/bootstrap/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap/bootstrap-theme.css" />
<link rel="stylesheet" type="text/css" href="css/swc.css" />
<meta charset="UTF-8" />
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body class="lesson">
<div class="container card">
<div class="banner">
</div>
<article>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<h1 class="title">Fitting models with <code>scipy.optimize</code></h1>
<p>Fitting models and testing the match of the models to the measured data is a fundamental activity in many fields of science. In this lesson, we will learn how to use non-linear optimization routines in <code>scipy.optimize</code>, to fit models to data.</p>
<section class="prereq panel panel-warning">
<div class="panel-heading">
<h2 id="prerequisites"><span class="glyphicon glyphicon-education"></span>Prerequisites</h2>
</div>
<div class="panel-body">
<p>Learners need to know how to use Python and Numpy, to the level taught in the Software Carpentry novice lesson.</p>
</div>
</section>
<section class="getready panel panel-warning">
<div class="panel-heading">
<h2 id="getting-ready"><span class="glyphicon glyphicon-check"></span>Getting ready</h2>
</div>
<div class="panel-body">
<ol style="list-style-type: decimal">
<li>Learners need to have the <code>scipy</code> library installed on their computers. If you have used your computer in a Software Carpentry workshop, it is likely that you already have it installed. You can test that by running the following in an IPython session:</li>
</ol>
<pre class="sourceCode python"><code class="sourceCode python"><span class="ch">import</span> scipy</code></pre>
<p>If this raises an error, you might need to run the following in the unix shell:</p>
<pre class="input"><code>$ pip install scipy</code></pre>
<p>Explanation: <a href="https://pip.pypa.io/en/stable/">pip</a> is a python <a href="https://en.wikipedia.org/wiki/Package_manager">‘package manager’</a>, which will go grab the necessary software for this lesson and install it on your machine. Another option is to use the <a href="">conda</a> package manager in the unix shell as follows:</p>
<pre class="input"><code>$ conda install scipy</code></pre>
<ol start="2" style="list-style-type: decimal">
<li>You need to download some files to follow this lesson:</li>
</ol>
<ul>
<li><p>Make a new folder in your Desktop called <code>scipy-optimize</code>.</p></li>
<li><p>Download <a href="./scipy-optimize-data.zip">scipy-optimize-data.zip</a> and move the file to this folder.</p></li>
<li><p>If it’s not unzipped yet, double-click on it to unzip it. You should end up with a new folder called <code>scipy-optimize-data</code>.</p></li>
<li><p>You can access this folder from the Unix shell with:</p></li>
</ul>
<pre class="input"><code>$ cd && cd Desktop/scipy-optimize/scipy-optimize-data</code></pre>
</div>
</section>
<h2 id="topics">Topics</h2>
<ol style="list-style-type: decimal">
<li><a href="01-intro.html">Introduction: models and why we like them</a></li>
<li><a href="02-linear-models.html">Linear models</a></li>
<li><a href="03-nonlinear-models.html">Nonlinear models and optimization</a></li>
<li><a href="04-cross-validation.html">Model evaluation with cross-validation</a></li>
<li><a href="05-summary.html">Summary</a></li>
</ol>
<h2 id="other-resources">Other Resources</h2>
<ul>
<li><a href="reference.html">Reference</a></li>
<li><a href="discussion.html">Discussion</a></li>
<li><a href="instructors.html">Instructor’s Guide</a></li>
</ul>
<blockquote>
<p>{.callout}</p>
<p>Instruction of this lesson was recorded on February 19th, 2016, as part of the <a href="http://dib-training.readthedocs.org/en/pub/">Data Intensive Biology training program</a> run by <a href="http://ivory.idyll.org/lab/">C. Titus Brown</a>. You can view the video on <a href="https://youtu.be/0eFokR-ikaA">youtube</a>.</p>
</blockquote>
</div>
</div>
</article>
<div class="footer">
<a class="label swc-blue-bg" href="https://github.com/arokem/scipy-optimize">Source</a>
<a class="label swc-blue-bg" href="mailto:arokem@gmail.com">Contact</a>
<a class="label swc-blue-bg" href="LICENSE.html">License</a>
</div>
</div>
<!-- Javascript placed at the end of the document so the pages load faster -->
<script src="http://software-carpentry.org/v5/js/jquery-1.9.1.min.js"></script>
<script src="css/bootstrap/bootstrap-js/bootstrap.js"></script>
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
</body>
</html>