reshaping code for project 2
This commit is contained in:
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -150,7 +152,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>Sep 22, 2019</h4></center> <!-- date -->
|
||||
<center><h4>Oct 9, 2019</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
<p>
|
||||
@@ -167,7 +169,7 @@ MathJax.Hub.Config({
|
||||
<li><a href="._LogReg-bs008.html">9</a></li>
|
||||
<li><a href="._LogReg-bs009.html">10</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs001.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -184,7 +186,7 @@ failure etc.
|
||||
<li><a href="._LogReg-bs009.html">10</a></li>
|
||||
<li><a href="._LogReg-bs010.html">11</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs002.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -167,7 +169,7 @@ models, as we will see later.
|
||||
<li><a href="._LogReg-bs010.html">11</a></li>
|
||||
<li><a href="._LogReg-bs011.html">12</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs003.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -174,7 +176,7 @@ $$
|
||||
<li><a href="._LogReg-bs011.html">12</a></li>
|
||||
<li><a href="._LogReg-bs012.html">13</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs004.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -172,7 +174,7 @@ where \( \hat{y} \) is a vector representing the possible outcomes, \( \hat{X} \
|
||||
<li><a href="._LogReg-bs012.html">13</a></li>
|
||||
<li><a href="._LogReg-bs013.html">14</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs005.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -171,7 +173,7 @@ the probability of a given category. This leads us to the logistic function.
|
||||
<li><a href="._LogReg-bs013.html">14</a></li>
|
||||
<li><a href="._LogReg-bs014.html">15</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs006.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -172,7 +174,7 @@ Note that \( 1-p(t)= p(-t) \).
|
||||
<li><a href="._LogReg-bs014.html">15</a></li>
|
||||
<li><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs007.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -217,7 +219,7 @@ plt<span style="color: #666666">.</span>show()
|
||||
<li><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs008.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -173,6 +175,8 @@ $$
|
||||
<li><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs009.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -174,6 +176,7 @@ $$
|
||||
<li><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs010.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -172,6 +174,7 @@ in practice we often supplement the cross-entropy with additional regularization
|
||||
<li><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs011.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -172,6 +174,7 @@ $$
|
||||
<li><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs012.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -172,6 +174,7 @@ $$
|
||||
<li><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs013.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -164,6 +166,7 @@ $$
|
||||
<li><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs014.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -175,6 +177,7 @@ and the model is specified in term of \( K-1 \) so-called log-odds or
|
||||
<li><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs015.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -186,6 +188,7 @@ methods</a>.
|
||||
<li class="active"><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs016.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -197,6 +199,7 @@ MathJax.Hub.Config({
|
||||
<li><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li class="active"><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs017.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -132,7 +134,8 @@ MathJax.Hub.Config({
|
||||
<!-- !split -->
|
||||
|
||||
<h2 id="___sec16" class="anchor">The Credit Card example </h2>
|
||||
Here we use the the <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_self">credit card data</a>. More text to come.
|
||||
Here we use the the <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_self">credit card data</a>.
|
||||
The data are from an extensive database from Taiwan and include more than ten predictors. More text and clean up of code will be added.
|
||||
|
||||
<p>
|
||||
|
||||
@@ -338,7 +341,6 @@ plt<span style="color: #666666">.</span>plot(x, best)
|
||||
plt<span style="color: #666666">.</span>show()
|
||||
</pre></div>
|
||||
<p>
|
||||
|
||||
<p>
|
||||
<!-- navigation buttons at the bottom of the page -->
|
||||
<ul class="pagination">
|
||||
@@ -354,6 +356,8 @@ plt<span style="color: #666666">.</span>show()
|
||||
<li><a href="._LogReg-bs015.html">16</a></li>
|
||||
<li><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li class="active"><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs018.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="description" content="Data Analysis and Machine Learning: Logistic Regression">
|
||||
|
||||
<title>Data Analysis and Machine Learning: Logistic Regression</title>
|
||||
@@ -46,26 +47,22 @@ Automatically generated HTML file from DocOnce source
|
||||
('Linear classifier', 2, None, '___sec3'),
|
||||
('Some selected properties', 2, None, '___sec4'),
|
||||
('The logistic function', 2, None, '___sec5'),
|
||||
('Two parameters', 2, None, '___sec6'),
|
||||
('Maximum likelihood', 2, None, '___sec7'),
|
||||
('The cost function rewritten', 2, None, '___sec8'),
|
||||
('Minimizing the cross entropy', 2, None, '___sec9'),
|
||||
('A more compact expression', 2, None, '___sec10'),
|
||||
('Extending to more predictors', 2, None, '___sec11'),
|
||||
('Including more classes', 2, None, '___sec12'),
|
||||
('The Softmax function', 2, None, '___sec13'),
|
||||
('A _scikit-learn_ example', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The two-dimensional Ising model, Predicting phase transition '
|
||||
'of the two-dimensional Ising model',
|
||||
('Examples of likelihood functions used in logistic regression '
|
||||
'and nueral networks',
|
||||
2,
|
||||
None,
|
||||
'___sec16'),
|
||||
('Reading in the data', 2, None, '___sec17'),
|
||||
('Logistic regression', 2, None, '___sec18'),
|
||||
('Exploring the logistic regression', 2, None, '___sec19'),
|
||||
('Accuracy of a classification model', 2, None, '___sec20'),
|
||||
('Analyzing the results', 2, None, '___sec21')]}
|
||||
'___sec6'),
|
||||
('Two parameters', 2, None, '___sec7'),
|
||||
('Maximum likelihood', 2, None, '___sec8'),
|
||||
('The cost function rewritten', 2, None, '___sec9'),
|
||||
('Minimizing the cross entropy', 2, None, '___sec10'),
|
||||
('A more compact expression', 2, None, '___sec11'),
|
||||
('Extending to more predictors', 2, None, '___sec12'),
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -109,22 +106,18 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs004.html#___sec3" style="font-size: 80%;">Linear classifier</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs005.html#___sec4" style="font-size: 80%;">Some selected properties</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs006.html#___sec5" style="font-size: 80%;">The logistic function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs007.html#___sec6" style="font-size: 80%;">Two parameters</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs008.html#___sec7" style="font-size: 80%;">Maximum likelihood</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs009.html#___sec8" style="font-size: 80%;">The cost function rewritten</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs010.html#___sec9" style="font-size: 80%;">Minimizing the cross entropy</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs011.html#___sec10" style="font-size: 80%;">A more compact expression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs012.html#___sec11" style="font-size: 80%;">Extending to more predictors</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs013.html#___sec12" style="font-size: 80%;">Including more classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs014.html#___sec13" style="font-size: 80%;">The Softmax function</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">A <b>scikit-learn</b> example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs007.html#___sec6" style="font-size: 80%;">Examples of likelihood functions used in logistic regression and nueral networks</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs008.html#___sec7" style="font-size: 80%;">Two parameters</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs009.html#___sec8" style="font-size: 80%;">Maximum likelihood</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs010.html#___sec9" style="font-size: 80%;">The cost function rewritten</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs011.html#___sec10" style="font-size: 80%;">Minimizing the cross entropy</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs012.html#___sec11" style="font-size: 80%;">A more compact expression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs013.html#___sec12" style="font-size: 80%;">Extending to more predictors</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs014.html#___sec13" style="font-size: 80%;">Including more classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The two-dimensional Ising model, Predicting phase transition of the two-dimensional Ising model</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec17" style="font-size: 80%;">Reading in the data</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs019.html#___sec18" style="font-size: 80%;">Logistic regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs020.html#___sec19" style="font-size: 80%;">Exploring the logistic regression</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs021.html#___sec20" style="font-size: 80%;">Accuracy of a classification model</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs022.html#___sec21" style="font-size: 80%;">Analyzing the results</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -140,51 +133,8 @@ MathJax.Hub.Config({
|
||||
<a name="part0018"></a>
|
||||
<!-- !split -->
|
||||
|
||||
<h2 id="___sec17" class="anchor">Reading in the data </h2>
|
||||
<h2 id="___sec17" class="anchor">Analysis of the credi card example </h2>
|
||||
|
||||
<p>
|
||||
Using the data from <a href="https://physics.bu.edu/~pankajm/ML-Review-Datasets/isingMC/" target="_self">Mehta et al.</a> (specifically the two datasets named <code>Ising2DFM_reSample_L40_T=All.pkl</code> and <code>Ising2DFM_reSample_L40_T=All_labels.pkl</code>) we have to unpack the data into numpy arrays.
|
||||
|
||||
<p>
|
||||
|
||||
<!-- code=python (!bc pycod) typeset with pygments style "default" -->
|
||||
<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span>filenames <span style="color: #666666">=</span> glob<span style="color: #666666">.</span>glob(os<span style="color: #666666">.</span>path<span style="color: #666666">.</span>join(<span style="color: #BA2121">".."</span>, <span style="color: #BA2121">"dat"</span>, <span style="color: #BA2121">"*"</span>))
|
||||
label_filename <span style="color: #666666">=</span> <span style="color: #008000">list</span>(<span style="color: #008000">filter</span>(<span style="color: #008000; font-weight: bold">lambda</span> x: <span style="color: #BA2121">"label"</span> <span style="color: #AA22FF; font-weight: bold">in</span> x, filenames))[<span style="color: #666666">0</span>]
|
||||
dat_filename <span style="color: #666666">=</span> <span style="color: #008000">list</span>(<span style="color: #008000">filter</span>(<span style="color: #008000; font-weight: bold">lambda</span> x: <span style="color: #BA2121">"label"</span> <span style="color: #AA22FF; font-weight: bold">not</span> <span style="color: #AA22FF; font-weight: bold">in</span> x, filenames))[<span style="color: #666666">0</span>]
|
||||
|
||||
<span style="color: #408080; font-style: italic"># Read in the labels</span>
|
||||
<span style="color: #008000; font-weight: bold">with</span> <span style="color: #008000">open</span>(label_filename, <span style="color: #BA2121">"rb"</span>) <span style="color: #008000; font-weight: bold">as</span> f:
|
||||
labels <span style="color: #666666">=</span> pickle<span style="color: #666666">.</span>load(f)
|
||||
|
||||
<span style="color: #408080; font-style: italic"># Read in the corresponding configurations</span>
|
||||
<span style="color: #008000; font-weight: bold">with</span> <span style="color: #008000">open</span>(dat_filename, <span style="color: #BA2121">"rb"</span>) <span style="color: #008000; font-weight: bold">as</span> f:
|
||||
data <span style="color: #666666">=</span> np<span style="color: #666666">.</span>unpackbits(pickle<span style="color: #666666">.</span>load(f))<span style="color: #666666">.</span>reshape(<span style="color: #666666">-1</span>, <span style="color: #666666">1600</span>)<span style="color: #666666">.</span>astype(<span style="color: #BA2121">"int"</span>)
|
||||
|
||||
<span style="color: #408080; font-style: italic"># Set spin-down to -1</span>
|
||||
data[data <span style="color: #666666">==</span> <span style="color: #666666">0</span>] <span style="color: #666666">=</span> <span style="color: #666666">-1</span>
|
||||
</pre></div>
|
||||
<p>
|
||||
This dataset consists of \( 10000 \) samples, i.e., \( 10000 \) spin
|
||||
configurations with \( 40 \times 40 \) spins each, for \( 16 \) temperatures
|
||||
between \( 0.25 \) to \( 4.0 \). Next we create a train/test-split and keep
|
||||
the data in the critical phase as a separate dataset for
|
||||
extrapolation-testing.
|
||||
|
||||
<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"># Set up slices of the dataset</span>
|
||||
ordered <span style="color: #666666">=</span> <span style="color: #008000">slice</span>(<span style="color: #666666">0</span>, <span style="color: #666666">70000</span>)
|
||||
critical <span style="color: #666666">=</span> <span style="color: #008000">slice</span>(<span style="color: #666666">70000</span>, <span style="color: #666666">100000</span>)
|
||||
disordered <span style="color: #666666">=</span> <span style="color: #008000">slice</span>(<span style="color: #666666">100000</span>, <span style="color: #666666">160000</span>)
|
||||
|
||||
X_train, X_test, y_train, y_test <span style="color: #666666">=</span> skms<span style="color: #666666">.</span>train_test_split(
|
||||
np<span style="color: #666666">.</span>concatenate((data[ordered], data[disordered])),
|
||||
np<span style="color: #666666">.</span>concatenate((labels[ordered], labels[disordered])),
|
||||
test_size<span style="color: #666666">=0.95</span>
|
||||
)
|
||||
</pre></div>
|
||||
<p>
|
||||
<p>
|
||||
<!-- navigation buttons at the bottom of the page -->
|
||||
<ul class="pagination">
|
||||
@@ -200,11 +150,6 @@ X_train, X_test, y_train, y_test <span style="color: #666666">=</span> skms<span
|
||||
<li><a href="._LogReg-bs016.html">17</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li class="active"><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-bs019.html">20</a></li>
|
||||
<li><a href="._LogReg-bs020.html">21</a></li>
|
||||
<li><a href="._LogReg-bs021.html">22</a></li>
|
||||
<li><a href="._LogReg-bs022.html">23</a></li>
|
||||
<li><a href="._LogReg-bs019.html">»</a></li>
|
||||
</ul>
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
|
||||
@@ -61,7 +61,8 @@ Automatically generated HTML file from DocOnce source
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -116,6 +117,7 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs015.html#___sec14" style="font-size: 80%;">More classes</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs016.html#___sec15" style="font-size: 80%;">A simple classification problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs017.html#___sec16" style="font-size: 80%;">The Credit Card example</a></li>
|
||||
<!-- navigation toc: --> <li><a href="._LogReg-bs018.html#___sec17" style="font-size: 80%;">Analysis of the credi card example</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -150,7 +152,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>Sep 22, 2019</h4></center> <!-- date -->
|
||||
<center><h4>Oct 9, 2019</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
<p>
|
||||
@@ -167,7 +169,7 @@ MathJax.Hub.Config({
|
||||
<li><a href="._LogReg-bs008.html">9</a></li>
|
||||
<li><a href="._LogReg-bs009.html">10</a></li>
|
||||
<li><a href="">...</a></li>
|
||||
<li><a href="._LogReg-bs017.html">18</a></li>
|
||||
<li><a href="._LogReg-bs018.html">19</a></li>
|
||||
<li><a href="._LogReg-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>Sep 22, 2019</h4></center> <!-- date -->
|
||||
<center><h4>Oct 9, 2019</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
|
||||
@@ -667,7 +667,8 @@ methods</a>.
|
||||
|
||||
<section>
|
||||
<h2 id="___sec16">The Credit Card example </h2>
|
||||
Here we use the the <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_blank">credit card data</a>. More text to come.
|
||||
Here we use the the <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_blank">credit card data</a>.
|
||||
The data are from an extensive database from Taiwan and include more than ten predictors. More text and clean up of code will be added.
|
||||
|
||||
<p>
|
||||
|
||||
@@ -875,6 +876,11 @@ plt.show()
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
<h2 id="___sec17">Analysis of the credi card example </h2>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
</div> <!-- class="slides" -->
|
||||
</div> <!-- class="reveal" -->
|
||||
|
||||
@@ -55,7 +55,8 @@ div { text-align: justify; text-justify: inter-word; }
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -97,7 +98,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>Sep 22, 2019</h4></center> <!-- date -->
|
||||
<center><h4>Oct 9, 2019</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
<!-- !split -->
|
||||
@@ -568,7 +569,8 @@ methods</a>.
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec16">The Credit Card example </h2>
|
||||
Here we use the the <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_blank">credit card data</a>. More text to come.
|
||||
Here we use the the <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_blank">credit card data</a>.
|
||||
The data are from an extensive database from Taiwan and include more than ten predictors. More text and clean up of code will be added.
|
||||
|
||||
<p>
|
||||
|
||||
@@ -774,6 +776,9 @@ plt.plot(x, best)
|
||||
plt.show()
|
||||
</pre></div>
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec17">Analysis of the credi card example </h2>
|
||||
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
|
||||
@@ -60,7 +60,8 @@ div { text-align: justify; text-justify: inter-word; }
|
||||
('Including more classes', 2, None, '___sec13'),
|
||||
('More classes', 2, None, '___sec14'),
|
||||
('A simple classification problem', 2, None, '___sec15'),
|
||||
('The Credit Card example', 2, None, '___sec16')]}
|
||||
('The Credit Card example', 2, None, '___sec16'),
|
||||
('Analysis of the credi card example', 2, None, '___sec17')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -102,7 +103,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>Sep 22, 2019</h4></center> <!-- date -->
|
||||
<center><h4>Oct 9, 2019</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
<!-- !split -->
|
||||
@@ -573,7 +574,8 @@ methods</a>.
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec16">The Credit Card example </h2>
|
||||
Here we use the the <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_blank">credit card data</a>. More text to come.
|
||||
Here we use the the <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_blank">credit card data</a>.
|
||||
The data are from an extensive database from Taiwan and include more than ten predictors. More text and clean up of code will be added.
|
||||
|
||||
<p>
|
||||
|
||||
@@ -779,6 +781,9 @@ plt<span style="color: #666666">.</span>plot(x, best)
|
||||
plt<span style="color: #666666">.</span>show()
|
||||
</pre></div>
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec17">Analysis of the credi card example </h2>
|
||||
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
|
||||
@@ -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: **Sep 22, 2019**\n",
|
||||
"Date: **Oct 9, 2019**\n",
|
||||
"\n",
|
||||
"Copyright 1999-2019, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license\n",
|
||||
"\n",
|
||||
@@ -668,7 +668,8 @@
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## The Credit Card example\n",
|
||||
"Here we use the the [credit card data](https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients). More text to come."
|
||||
"Here we use the the [credit card data](https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients). \n",
|
||||
"The data are from an extensive database from Taiwan and include more than ten predictors. More text and clean up of code will be added."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -886,6 +887,13 @@
|
||||
"\n",
|
||||
"plt.show()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Analysis of the credi card example"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {},
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -451,7 +451,7 @@ if __name__ == "__main__":
|
||||
!split
|
||||
===== The Credit Card example =====
|
||||
Here we use the the "credit card data":"https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients".
|
||||
The data are from an extensive database from Taiwan and include more than ten predictors.
|
||||
The data are from an extensive database from Taiwan and include more than ten predictors. More text and clean up of code will be added.
|
||||
|
||||
!bc pycod
|
||||
import pandas as pd
|
||||
|
||||
Reference in New Issue
Block a user