General update of several files with to do list
This commit is contained in:
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -193,7 +195,7 @@ MathJax.Hub.Config({
|
||||
<center>[2] <b>Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University</b></center>
|
||||
<br>
|
||||
<p>
|
||||
<center><h4>May 17, 2018</h4></center> <!-- date -->
|
||||
<center><h4>May 22, 2018</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
|
||||
@@ -217,7 +219,7 @@ MathJax.Hub.Config({
|
||||
<li><a href="._Regression-bs008.html">9</a></li>
|
||||
<li><a href="._Regression-bs009.html">10</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs001.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -214,7 +216,7 @@ A regression model aims at finding a likelihood function \( p(y\vert \hat{x}) \)
|
||||
<li><a href="._Regression-bs009.html">10</a></li>
|
||||
<li><a href="._Regression-bs010.html">11</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs002.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -211,7 +213,7 @@ where \( \epsilon_i \) is the error in our approximation.
|
||||
<li><a href="._Regression-bs010.html">11</a></li>
|
||||
<li><a href="._Regression-bs011.html">12</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs003.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -211,7 +213,7 @@ $$
|
||||
<li><a href="._Regression-bs011.html">12</a></li>
|
||||
<li><a href="._Regression-bs012.html">13</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs004.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -231,7 +233,7 @@ $$
|
||||
<li><a href="._Regression-bs012.html">13</a></li>
|
||||
<li><a href="._Regression-bs013.html">14</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs005.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -216,7 +218,7 @@ $$
|
||||
<li><a href="._Regression-bs013.html">14</a></li>
|
||||
<li><a href="._Regression-bs014.html">15</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs006.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -222,7 +224,7 @@ The left-hand side of this equation forms know. Our error vector \( \hat{\epsilo
|
||||
<li><a href="._Regression-bs014.html">15</a></li>
|
||||
<li><a href="._Regression-bs015.html">16</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs007.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -217,7 +219,7 @@ $$
|
||||
<li><a href="._Regression-bs015.html">16</a></li>
|
||||
<li><a href="._Regression-bs016.html">17</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs008.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -220,7 +222,7 @@ $$
|
||||
<li><a href="._Regression-bs016.html">17</a></li>
|
||||
<li><a href="._Regression-bs017.html">18</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs009.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -236,7 +238,7 @@ $$
|
||||
<li><a href="._Regression-bs017.html">18</a></li>
|
||||
<li><a href="._Regression-bs018.html">19</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs010.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -224,7 +226,7 @@ $$
|
||||
<li><a href="._Regression-bs018.html">19</a></li>
|
||||
<li><a href="._Regression-bs019.html">20</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs011.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -226,7 +228,7 @@ meaning that the solution for \( \hat{\beta} \) is the one which minimizes the r
|
||||
<li><a href="._Regression-bs019.html">20</a></li>
|
||||
<li><a href="._Regression-bs020.html">21</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs012.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -237,7 +239,7 @@ We see that, as expected, a linear fit gives a seemingly (from the graph) good r
|
||||
<li><a href="._Regression-bs020.html">21</a></li>
|
||||
<li><a href="._Regression-bs021.html">22</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs013.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -228,7 +230,7 @@ plt<span style="color: #666666">.</span>show()
|
||||
<li><a href="._Regression-bs021.html">22</a></li>
|
||||
<li><a href="._Regression-bs022.html">23</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs014.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -211,7 +213,7 @@ Let us now try to assess the quality of our fit by studying various measures.
|
||||
<li><a href="._Regression-bs022.html">23</a></li>
|
||||
<li><a href="._Regression-bs023.html">24</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs015.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -201,6 +203,8 @@ MathJax.Hub.Config({
|
||||
<li><a href="._Regression-bs022.html">23</a></li>
|
||||
<li><a href="._Regression-bs023.html">24</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs016.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -219,6 +221,7 @@ where the matrix \( \hat{\Sigma} \) is a diagonal matrix with \( \sigma_i \) as
|
||||
<li><a href="._Regression-bs022.html">23</a></li>
|
||||
<li><a href="._Regression-bs023.html">24</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs017.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -223,6 +225,7 @@ where we have defined the matrix \( \hat{A} =\hat{X}/\hat{\Sigma} \) with matrix
|
||||
<li><a href="._Regression-bs022.html">23</a></li>
|
||||
<li><a href="._Regression-bs023.html">24</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs018.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -220,6 +222,7 @@ $$
|
||||
<li><a href="._Regression-bs022.html">23</a></li>
|
||||
<li><a href="._Regression-bs023.html">24</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs019.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -97,7 +97,8 @@ Automatically generated HTML file from DocOnce source
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -158,7 +159,8 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs021.html#___sec20" style="font-size: 80%;">The \( \chi^2 \) function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs022.html#___sec21" style="font-size: 80%;">Simple regression model with gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs023.html#___sec22" style="font-size: 80%;">Simple regression model with stochastic gradient descent</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs024.html#___sec23" style="font-size: 80%;">Polynomial Regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._Regression-bs025.html#___sec24" style="font-size: 80%;">The singular value decompostion</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -193,7 +195,7 @@ MathJax.Hub.Config({
|
||||
<center>[2] <b>Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University</b></center>
|
||||
<br>
|
||||
<p>
|
||||
<center><h4>May 17, 2018</h4></center> <!-- date -->
|
||||
<center><h4>May 22, 2018</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
|
||||
@@ -217,7 +219,7 @@ MathJax.Hub.Config({
|
||||
<li><a href="._Regression-bs008.html">9</a></li>
|
||||
<li><a href="._Regression-bs009.html">10</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._Regression-bs024.html">25</a></li>
|
||||
<li><a href="._Regression-bs025.html">26</a></li>
|
||||
<li><a href="._Regression-bs001.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -148,7 +148,7 @@ MathJax.Hub.Config({
|
||||
<center>[2] <b>Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University</b></center>
|
||||
<br>
|
||||
<p> <br>
|
||||
<center><h4>May 17, 2018</h4></center> <!-- date -->
|
||||
<center><h4>May 22, 2018</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
|
||||
@@ -859,7 +859,39 @@ sgdreg.fit(x,y.ravel())
|
||||
|
||||
|
||||
<section>
|
||||
<h2 id="___sec23">The singular value decompostion </h2>
|
||||
<h2 id="___sec23">Polynomial Regression </h2>
|
||||
<p>
|
||||
|
||||
<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
|
||||
<div class="highlight" style="background: #eeeedd"><pre style="font-size: 80%; line-height: 125%"><span></span><span style="color: #228B22"># Importing various packages</span>
|
||||
<span style="color: #8B008B; font-weight: bold">from</span> <span style="color: #008b45; text-decoration: underline">math</span> <span style="color: #8B008B; font-weight: bold">import</span> exp, sqrt
|
||||
<span style="color: #8B008B; font-weight: bold">from</span> <span style="color: #008b45; text-decoration: underline">random</span> <span style="color: #8B008B; font-weight: bold">import</span> random, seed
|
||||
<span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">numpy</span> <span style="color: #8B008B; font-weight: bold">as</span> <span style="color: #008b45; text-decoration: underline">np</span>
|
||||
<span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">matplotlib.pyplot</span> <span style="color: #8B008B; font-weight: bold">as</span> <span style="color: #008b45; text-decoration: underline">plt</span>
|
||||
|
||||
m = <span style="color: #B452CD">100</span>
|
||||
x = <span style="color: #B452CD">2</span>*np.random.rand(m,<span style="color: #B452CD">1</span>)+<span style="color: #B452CD">4.</span>
|
||||
y = <span style="color: #B452CD">4</span>+<span style="color: #B452CD">3</span>*x*x+ +x-np.random.randn(m,<span style="color: #B452CD">1</span>)
|
||||
|
||||
xb = np.c_[np.ones((m,<span style="color: #B452CD">1</span>)), x]
|
||||
theta = np.linalg.inv(xb.T.dot(xb)).dot(xb.T).dot(y)
|
||||
xnew = np.array([[<span style="color: #B452CD">0</span>],[<span style="color: #B452CD">2</span>]])
|
||||
xbnew = np.c_[np.ones((<span style="color: #B452CD">2</span>,<span style="color: #B452CD">1</span>)), xnew]
|
||||
ypredict = xbnew.dot(theta)
|
||||
|
||||
plt.plot(xnew, ypredict, <span style="color: #CD5555">"r-"</span>)
|
||||
plt.plot(x, y ,<span style="color: #CD5555">'ro'</span>)
|
||||
plt.axis([<span style="color: #B452CD">0</span>,<span style="color: #B452CD">2.0</span>,<span style="color: #B452CD">0</span>, <span style="color: #B452CD">15.0</span>])
|
||||
plt.xlabel(<span style="color: #CD5555">r'$x$'</span>)
|
||||
plt.ylabel(<span style="color: #CD5555">r'$y$'</span>)
|
||||
plt.title(<span style="color: #CD5555">r'Random numbers '</span>)
|
||||
plt.show()
|
||||
</pre></div>
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
<h2 id="___sec24">The singular value decompostion </h2>
|
||||
<div class="alert alert-block alert-block alert-text-normal">
|
||||
<b></b>
|
||||
<p>
|
||||
|
||||
@@ -117,7 +117,8 @@ div { text-align: justify; text-justify: inter-word; }
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -159,7 +160,7 @@ MathJax.Hub.Config({
|
||||
<center>[2] <b>Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University</b></center>
|
||||
<br>
|
||||
<p>
|
||||
<center><h4>May 17, 2018</h4></center> <!-- date -->
|
||||
<center><h4>May 22, 2018</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
@@ -795,7 +796,38 @@ sgdreg.fit(x,y.ravel())
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec23">The singular value decompostion </h2>
|
||||
<h2 id="___sec23">Polynomial Regression </h2>
|
||||
<p>
|
||||
|
||||
<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
|
||||
<div class="highlight" style="background: #eeeedd"><pre style="line-height: 125%"><span></span><span style="color: #228B22"># Importing various packages</span>
|
||||
<span style="color: #8B008B; font-weight: bold">from</span> <span style="color: #008b45; text-decoration: underline">math</span> <span style="color: #8B008B; font-weight: bold">import</span> exp, sqrt
|
||||
<span style="color: #8B008B; font-weight: bold">from</span> <span style="color: #008b45; text-decoration: underline">random</span> <span style="color: #8B008B; font-weight: bold">import</span> random, seed
|
||||
<span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">numpy</span> <span style="color: #8B008B; font-weight: bold">as</span> <span style="color: #008b45; text-decoration: underline">np</span>
|
||||
<span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">matplotlib.pyplot</span> <span style="color: #8B008B; font-weight: bold">as</span> <span style="color: #008b45; text-decoration: underline">plt</span>
|
||||
|
||||
m = <span style="color: #B452CD">100</span>
|
||||
x = <span style="color: #B452CD">2</span>*np.random.rand(m,<span style="color: #B452CD">1</span>)+<span style="color: #B452CD">4.</span>
|
||||
y = <span style="color: #B452CD">4</span>+<span style="color: #B452CD">3</span>*x*x+ +x-np.random.randn(m,<span style="color: #B452CD">1</span>)
|
||||
|
||||
xb = np.c_[np.ones((m,<span style="color: #B452CD">1</span>)), x]
|
||||
theta = np.linalg.inv(xb.T.dot(xb)).dot(xb.T).dot(y)
|
||||
xnew = np.array([[<span style="color: #B452CD">0</span>],[<span style="color: #B452CD">2</span>]])
|
||||
xbnew = np.c_[np.ones((<span style="color: #B452CD">2</span>,<span style="color: #B452CD">1</span>)), xnew]
|
||||
ypredict = xbnew.dot(theta)
|
||||
|
||||
plt.plot(xnew, ypredict, <span style="color: #CD5555">"r-"</span>)
|
||||
plt.plot(x, y ,<span style="color: #CD5555">'ro'</span>)
|
||||
plt.axis([<span style="color: #B452CD">0</span>,<span style="color: #B452CD">2.0</span>,<span style="color: #B452CD">0</span>, <span style="color: #B452CD">15.0</span>])
|
||||
plt.xlabel(<span style="color: #CD5555">r'$x$'</span>)
|
||||
plt.ylabel(<span style="color: #CD5555">r'$y$'</span>)
|
||||
plt.title(<span style="color: #CD5555">r'Random numbers '</span>)
|
||||
plt.show()
|
||||
</pre></div>
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec24">The singular value decompostion </h2>
|
||||
<div class="alert alert-block alert-block alert-text-normal">
|
||||
<b></b>
|
||||
<p>
|
||||
|
||||
@@ -122,7 +122,8 @@ div { text-align: justify; text-justify: inter-word; }
|
||||
2,
|
||||
None,
|
||||
'___sec22'),
|
||||
('The singular value decompostion', 2, None, '___sec23')]}
|
||||
('Polynomial Regression', 2, None, '___sec23'),
|
||||
('The singular value decompostion', 2, None, '___sec24')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -164,7 +165,7 @@ MathJax.Hub.Config({
|
||||
<center>[2] <b>Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University</b></center>
|
||||
<br>
|
||||
<p>
|
||||
<center><h4>May 17, 2018</h4></center> <!-- date -->
|
||||
<center><h4>May 22, 2018</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
@@ -800,7 +801,38 @@ sgdreg<span style="color: #666666">.</span>fit(x,y<span style="color: #666666">.
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec23">The singular value decompostion </h2>
|
||||
<h2 id="___sec23">Polynomial Regression </h2>
|
||||
<p>
|
||||
|
||||
<!-- code=python (!bc pycod) typeset with pygments style "default" -->
|
||||
<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span><span style="color: #408080; font-style: italic"># Importing various packages</span>
|
||||
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">math</span> <span style="color: #008000; font-weight: bold">import</span> exp, sqrt
|
||||
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">random</span> <span style="color: #008000; font-weight: bold">import</span> random, seed
|
||||
<span style="color: #008000; font-weight: bold">import</span> <span style="color: #0000FF; font-weight: bold">numpy</span> <span style="color: #008000; font-weight: bold">as</span> <span style="color: #0000FF; font-weight: bold">np</span>
|
||||
<span style="color: #008000; font-weight: bold">import</span> <span style="color: #0000FF; font-weight: bold">matplotlib.pyplot</span> <span style="color: #008000; font-weight: bold">as</span> <span style="color: #0000FF; font-weight: bold">plt</span>
|
||||
|
||||
m <span style="color: #666666">=</span> <span style="color: #666666">100</span>
|
||||
x <span style="color: #666666">=</span> <span style="color: #666666">2*</span>np<span style="color: #666666">.</span>random<span style="color: #666666">.</span>rand(m,<span style="color: #666666">1</span>)<span style="color: #666666">+4.</span>
|
||||
y <span style="color: #666666">=</span> <span style="color: #666666">4+3*</span>x<span style="color: #666666">*</span>x<span style="color: #666666">+</span> <span style="color: #666666">+</span>x<span style="color: #666666">-</span>np<span style="color: #666666">.</span>random<span style="color: #666666">.</span>randn(m,<span style="color: #666666">1</span>)
|
||||
|
||||
xb <span style="color: #666666">=</span> np<span style="color: #666666">.</span>c_[np<span style="color: #666666">.</span>ones((m,<span style="color: #666666">1</span>)), x]
|
||||
theta <span style="color: #666666">=</span> np<span style="color: #666666">.</span>linalg<span style="color: #666666">.</span>inv(xb<span style="color: #666666">.</span>T<span style="color: #666666">.</span>dot(xb))<span style="color: #666666">.</span>dot(xb<span style="color: #666666">.</span>T)<span style="color: #666666">.</span>dot(y)
|
||||
xnew <span style="color: #666666">=</span> np<span style="color: #666666">.</span>array([[<span style="color: #666666">0</span>],[<span style="color: #666666">2</span>]])
|
||||
xbnew <span style="color: #666666">=</span> np<span style="color: #666666">.</span>c_[np<span style="color: #666666">.</span>ones((<span style="color: #666666">2</span>,<span style="color: #666666">1</span>)), xnew]
|
||||
ypredict <span style="color: #666666">=</span> xbnew<span style="color: #666666">.</span>dot(theta)
|
||||
|
||||
plt<span style="color: #666666">.</span>plot(xnew, ypredict, <span style="color: #BA2121">"r-"</span>)
|
||||
plt<span style="color: #666666">.</span>plot(x, y ,<span style="color: #BA2121">'ro'</span>)
|
||||
plt<span style="color: #666666">.</span>axis([<span style="color: #666666">0</span>,<span style="color: #666666">2.0</span>,<span style="color: #666666">0</span>, <span style="color: #666666">15.0</span>])
|
||||
plt<span style="color: #666666">.</span>xlabel(<span style="color: #BA2121">r'$x$'</span>)
|
||||
plt<span style="color: #666666">.</span>ylabel(<span style="color: #BA2121">r'$y$'</span>)
|
||||
plt<span style="color: #666666">.</span>title(<span style="color: #BA2121">r'Random numbers '</span>)
|
||||
plt<span style="color: #666666">.</span>show()
|
||||
</pre></div>
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec24">The singular value decompostion </h2>
|
||||
<div class="alert alert-block alert-block alert-text-normal">
|
||||
<b></b>
|
||||
<p>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user