update
This commit is contained in:
@@ -242,6 +242,33 @@ const thebe_selector_output = ".output, .cell_output"
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading">
|
||||
<span class="caption-text">
|
||||
Weekly material, notes and exercises
|
||||
</span>
|
||||
</p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1">
|
||||
<a class="reference internal" href="exercisesweek34.html">
|
||||
Exercises week 34
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l1">
|
||||
<a class="reference internal" href="week34.html">
|
||||
Week 34: Introduction to the course, Logistics and Practicalities
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l1">
|
||||
<a class="reference internal" href="exercisesweek35.html">
|
||||
Exercises week 35
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l1">
|
||||
<a class="reference internal" href="week35.html">
|
||||
Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</nav> <!-- To handle the deprecated key -->
|
||||
@@ -1345,17 +1372,6 @@ converge. So, welcome to the promised land of quadratic programming.</p>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell_output docutils container">
|
||||
<div class="output traceback highlight-ipythontb notranslate"><div class="highlight"><pre><span></span><span class="gt">---------------------------------------------------------------------------</span>
|
||||
<span class="ne">ModuleNotFoundError</span><span class="g g-Whitespace"> </span>Traceback (most recent call last)
|
||||
<span class="nn">Input In [4],</span> in <span class="ni"><cell line: 2></span><span class="nt">()</span>
|
||||
<span class="g g-Whitespace"> </span><span class="mi">1</span> <span class="kn">import</span> <span class="nn">numpy</span>
|
||||
<span class="ne">----> </span><span class="mi">2</span> <span class="kn">import</span> <span class="nn">cvxopt</span>
|
||||
|
||||
<span class="ne">ModuleNotFoundError</span>: No module named 'cvxopt'
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>This will make our life much easier. You don’t need t write your own optimizer.</p>
|
||||
<p>We remind ourselves about the general problem we want to solve</p>
|
||||
@@ -1419,6 +1435,14 @@ sol[’primal objective’]
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell_output docutils container">
|
||||
<div class="output traceback highlight-ipythontb notranslate"><div class="highlight"><pre><span></span> Input In [5]
|
||||
P = matrix(numpy.diag([1,0]), tc=’d’)
|
||||
^
|
||||
SyntaxError: invalid character '’' (U+2019)
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>We are now ready to return to our setup of the optmization problem for a more realistic case. Introducing the <strong>slack</strong> parameter <span class="math notranslate nohighlight">\(C\)</span> we have</p>
|
||||
<div class="math notranslate nohighlight">
|
||||
|
||||
Reference in New Issue
Block a user