regression add

This commit is contained in:
mhjensen
2019-12-24 15:28:49 +01:00
parent c25220b1bb
commit a001e514eb
10 changed files with 67 additions and 9 deletions
@@ -425,7 +425,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>Dec 21, 2019</h4></center> <!-- date -->
<center><h4>Dec 24, 2019</h4></center> <!-- date -->
<br>
<p>
@@ -444,6 +444,14 @@ and finally the relative error as
<span style="color: #008000; font-weight: bold">return</span> <span style="color: #008000">abs</span>((y_data<span style="color: #666666">-</span>y_model)<span style="color: #666666">/</span>y_data)
<span style="color: #008000; font-weight: bold">print</span>(RelativeError(Energies, ytilde))
</pre></div>
<p>
We could also add the so-called Huber norm, which we defined as
$$
H_{\delta}(a)={\begin{cases}{\frac {1}{2}}{a^{2}}&{\text{for }}|a|\leq \delta ,\\\delta (|a|-{\frac {1}{2}}\delta ),&{\text{otherwise.}}\end{cases}}},
$$
with \( a=\boldsymbol{y} - \boldsymbol{\tilde{y}} \).
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
+1 -1
View File
@@ -425,7 +425,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>Dec 21, 2019</h4></center> <!-- date -->
<center><h4>Dec 24, 2019</h4></center> <!-- date -->
<br>
<p>
+10 -1
View File
@@ -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>&nbsp;<br>
<center><h4>Dec 21, 2019</h4></center> <!-- date -->
<center><h4>Dec 24, 2019</h4></center> <!-- date -->
<br>
<p>
@@ -852,6 +852,15 @@ and finally the relative error as
<span style="color: #8B008B; font-weight: bold">return</span> <span style="color: #658b00">abs</span>((y_data-y_model)/y_data)
<span style="color: #8B008B; font-weight: bold">print</span>(RelativeError(Energies, ytilde))
</pre></div>
<p>
We could also add the so-called Huber norm, which we defined as
<p>&nbsp;<br>
$$
H_{\delta}(a)={\begin{cases}{\frac {1}{2}}{a^{2}}&{\text{for }}|a|\leq \delta ,\\\delta (|a|-{\frac {1}{2}}\delta ),&{\text{otherwise.}}\end{cases}}},
$$
<p>&nbsp;<br>
with \( a=\boldsymbol{y} - \boldsymbol{\tilde{y}} \).
</section>
@@ -305,7 +305,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>Dec 21, 2019</h4></center> <!-- date -->
<center><h4>Dec 24, 2019</h4></center> <!-- date -->
<br>
<p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
@@ -955,6 +955,14 @@ and finally the relative error as
<span style="color: #8B008B; font-weight: bold">return</span> <span style="color: #658b00">abs</span>((y_data-y_model)/y_data)
<span style="color: #8B008B; font-weight: bold">print</span>(RelativeError(Energies, ytilde))
</pre></div>
<p>
We could also add the so-called Huber norm, which we defined as
$$
H_{\delta}(a)={\begin{cases}{\frac {1}{2}}{a^{2}}&{\text{for }}|a|\leq \delta ,\\\delta (|a|-{\frac {1}{2}}\delta ),&{\text{otherwise.}}\end{cases}}},
$$
with \( a=\boldsymbol{y} - \boldsymbol{\tilde{y}} \).
<p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
+9 -1
View File
@@ -310,7 +310,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>Dec 21, 2019</h4></center> <!-- date -->
<center><h4>Dec 24, 2019</h4></center> <!-- date -->
<br>
<p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
@@ -960,6 +960,14 @@ and finally the relative error as
<span style="color: #008000; font-weight: bold">return</span> <span style="color: #008000">abs</span>((y_data<span style="color: #666666">-</span>y_model)<span style="color: #666666">/</span>y_data)
<span style="color: #008000; font-weight: bold">print</span>(RelativeError(Energies, ytilde))
</pre></div>
<p>
We could also add the so-called Huber norm, which we defined as
$$
H_{\delta}(a)={\begin{cases}{\frac {1}{2}}{a^{2}}&{\text{for }}|a|\leq \delta ,\\\delta (|a|-{\frac {1}{2}}\delta ),&{\text{otherwise.}}\end{cases}}},
$$
with \( a=\boldsymbol{y} - \boldsymbol{\tilde{y}} \).
<p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
+22 -3
View File
@@ -10,7 +10,7 @@
"<!-- Author: --> \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 21, 2019**\n",
"Date: **Dec 24, 2019**\n",
"\n",
"Copyright 1999-2019, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license\n",
"\n",
@@ -1031,6 +1031,25 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We could also add the so-called Huber norm, which we defined as"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$\n",
"H_{\\delta}(a)={\\begin{cases}{\\frac {1}{2}}{a^{2}}&{\\text{for }}|a|\\leq \\delta ,\\\\\\delta (|a|-{\\frac {1}{2}}\\delta ),&{\\text{otherwise.}}\\end{cases}}},\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"with $a=\\boldsymbol{y} - \\boldsymbol{\\tilde{y}}$.\n",
"\n",
"\n",
"## The $\\chi^2$ function\n",
"\n",
"Normally, the response (dependent or outcome) variable $y_i$ is the\n",
@@ -3374,7 +3393,7 @@
"source": [
"1\n",
"1\n",
"2\n",
"3\n",
" \n",
"<\n",
"<\n",
@@ -6103,7 +6122,7 @@
"source": [
"1\n",
"7\n",
"6\n",
"7\n",
" \n",
"<\n",
"<\n",
Binary file not shown.
Binary file not shown.
+7 -1
View File
@@ -575,7 +575,13 @@ print(RelativeError(Energies, ytilde))
!ec
We could also add the so-called Huber norm, which we defined as
!bt
\[
H_{\delta}(a)={\begin{cases}{\frac {1}{2}}{a^{2}}&{\text{for }}|a|\leq \delta ,\\\delta (|a|-{\frac {1}{2}}\delta ),&{\text{otherwise.}}\end{cases}}},
\]
!et
with $a=\bm{y} - \bm{\tilde{y}}$.
!split