<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Machine-Learning-using-R%2FC2%2FLogistic-Regression-in-R%2FEnglish</id>
		<title>Machine-Learning-using-R/C2/Logistic-Regression-in-R/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Machine-Learning-using-R%2FC2%2FLogistic-Regression-in-R%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;action=history"/>
		<updated>2026-04-09T04:57:29Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56576&amp;oldid=prev</id>
		<title>Ushav at 10:31, 31 May 2024</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56576&amp;oldid=prev"/>
				<updated>2024-05-31T10:31:10Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 10:31, 31 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 654:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 654:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Model Evaluation.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Model Evaluation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Visualization of the model Decision Boundary&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Visualization of the model Decision Boundary&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Limitations of Logistic Regression&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Limitations of Logistic Regression &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Model&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 707:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 707:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Acknowledgment&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Acknowledgment&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| The '''Spoken Tutorial''' was established by the Ministry of Education Govt of India. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| The '''Spoken Tutorial''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;project &lt;/ins&gt;was established by the Ministry of Education Govt of India. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| Show Slide&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| Show Slide&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ushav</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56575&amp;oldid=prev</id>
		<title>Ushav at 10:25, 31 May 2024</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56575&amp;oldid=prev"/>
				<updated>2024-05-31T10:25:47Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 10:25, 31 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 640:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 640:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Let &lt;/del&gt;us summarize what we have learned.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Now let &lt;/ins&gt;us summarize what we have learned.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| Show Slide&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| Show Slide&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 651:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 651:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Assumptions of Logistic Regression&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Assumptions of Logistic Regression&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Advantages of Logistic Regression&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Advantages of Logistic Regression&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Implementation of Logistic Regression &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in '''R''' &lt;/del&gt;using '''Raisin '''dataset'''.'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Implementation of Logistic Regression using '''Raisin '''dataset'''.'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Model Evaluation.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Model Evaluation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Visualization of the model Decision Boundary&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Visualization of the model Decision Boundary&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ushav</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56574&amp;oldid=prev</id>
		<title>Ushav at 10:19, 31 May 2024</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56574&amp;oldid=prev"/>
				<updated>2024-05-31T10:19:19Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 10:19, 31 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 552:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 552:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It converts the predicted probabilities of &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;he &lt;/del&gt;points into classes.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It converts the predicted probabilities of &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/ins&gt;points into classes.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If the probability exceeds 0.5 then '''Kecimen '''class otherwise '''Besni '''Class is chosen.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If the probability exceeds 0.5 then '''Kecimen '''class otherwise '''Besni '''Class is chosen.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ushav</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56571&amp;oldid=prev</id>
		<title>Ushav at 09:17, 31 May 2024</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56571&amp;oldid=prev"/>
				<updated>2024-05-31T09:17:24Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:17, 31 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 529:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 529:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''grid$classnum &amp;lt;- as.numeric(as.factor(grid$class))'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''grid$classnum &amp;lt;- as.numeric(as.factor(grid$class))'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| We will visualize the decision boundary of the model.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| We will &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;now &lt;/ins&gt;visualize the decision boundary of the model.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the '''Source''' window type these commands&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the '''Source''' window type these commands&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ushav</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56570&amp;oldid=prev</id>
		<title>Ushav at 09:14, 31 May 2024</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56570&amp;oldid=prev"/>
				<updated>2024-05-31T09:14:24Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:14, 31 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 482:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 482:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''plot_confusion_matrix(confusion)'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''plot_confusion_matrix(confusion)'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Click on '''QDA.R''' in the '''Source '''window.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the '''Source''' window type this command&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the '''Source''' window type this command&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ushav</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56569&amp;oldid=prev</id>
		<title>Ushav at 09:06, 31 May 2024</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56569&amp;oldid=prev"/>
				<updated>2024-05-31T09:06:03Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:06, 31 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 121:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 121:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| I have downloaded and moved these files to the '''Logistic Regression''' folder. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| I have downloaded and moved these files to the '''Logistic Regression''' folder. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This folder is located in the '''MLProject '''folder &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;on the '''Desktop'''&lt;/del&gt;. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This folder is located in the '''MLProject '''folder. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ushav</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56568&amp;oldid=prev</id>
		<title>Ushav at 09:00, 31 May 2024</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56568&amp;oldid=prev"/>
				<updated>2024-05-31T09:00:11Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:00, 31 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Model Evaluation.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Model Evaluation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Visualization of the model Decision Boundary&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Visualization of the model Decision Boundary&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Limitations of Logistic Regression&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ushav</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56566&amp;oldid=prev</id>
		<title>Ushav: Created page with &quot;'''Title of the script''': Logistic Regression  '''Author''': Yate Asseke Ronald Olivera and Debatosh Chakraborty  '''Keywords''': R, RStudio, machine learning, supervised, un...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Machine-Learning-using-R/C2/Logistic-Regression-in-R/English&amp;diff=56566&amp;oldid=prev"/>
				<updated>2024-05-31T08:55:38Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Title of the script&amp;#039;&amp;#039;&amp;#039;: Logistic Regression  &amp;#039;&amp;#039;&amp;#039;Author&amp;#039;&amp;#039;&amp;#039;: Yate Asseke Ronald Olivera and Debatosh Chakraborty  &amp;#039;&amp;#039;&amp;#039;Keywords&amp;#039;&amp;#039;&amp;#039;: R, RStudio, machine learning, supervised, un...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Title of the script''': Logistic Regression&lt;br /&gt;
&lt;br /&gt;
'''Author''': Yate Asseke Ronald Olivera and Debatosh Chakraborty&lt;br /&gt;
&lt;br /&gt;
'''Keywords''': R, RStudio, machine learning, supervised, unsupervised, classification, logistic regression, video tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| align=center| '''Visual Cue'''&lt;br /&gt;
| align=center| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Show slide'''&lt;br /&gt;
&lt;br /&gt;
'''Opening Slide'''&lt;br /&gt;
|| Welcome to this spoken tutorial on '''Logistic Regression in R.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Show slide'''&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| In this tutorial, we will learn about &lt;br /&gt;
* Logistic Regression&lt;br /&gt;
* Assumptions of Logistic Regression&lt;br /&gt;
* Advantages of Logistic Regression&lt;br /&gt;
* Implementation of Logistic Regression in '''R''' using '''Raisin '''dataset'''.'''&lt;br /&gt;
* Model Evaluation.&lt;br /&gt;
* Visualization of the model Decision Boundary&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Show slide'''&lt;br /&gt;
&lt;br /&gt;
'''System Specifications'''&lt;br /&gt;
|| This tutorial is recorded using,&lt;br /&gt;
* '''Windows 11 '''&lt;br /&gt;
* '''R '''version''' 4.3.0'''&lt;br /&gt;
* '''RStudio''' version '''2023.06.1'''&lt;br /&gt;
&lt;br /&gt;
It is recommended to install '''R''' version '''4.2.0''' or higher.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Show slide'''&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites '''&lt;br /&gt;
|| To follow this tutorial, the learner should know:&lt;br /&gt;
* Basic programming in '''R'''.&lt;br /&gt;
* '''Basics of Machine Learning'''.&lt;br /&gt;
&lt;br /&gt;
If not, please access the relevant tutorials on this website.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let us learn what '''logistic regression''' is&lt;br /&gt;
|- &lt;br /&gt;
|| '''Show slide'''&lt;br /&gt;
&lt;br /&gt;
'''Logistic Regression'''&lt;br /&gt;
&lt;br /&gt;
|| Logistic regression is a statistical model used for classification.&lt;br /&gt;
&lt;br /&gt;
It models the probability of success for the explanatory variable.&lt;br /&gt;
&lt;br /&gt;
* It predicts the probability, unlike the response in linear regression.&lt;br /&gt;
* The predicted probability is used as a classifier.&lt;br /&gt;
* The probability of success is modeled using the''' logit or (log odds) '''function.&lt;br /&gt;
* It is a linear classifier, as the logistic regression model has a linear logit.&lt;br /&gt;
* It is often used when the response variable is categorical.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Show slide'''&lt;br /&gt;
&lt;br /&gt;
'''Assumptions of Logistic Regression'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The distribution of the dependent variable is Bernoulli.&lt;br /&gt;
* The data records are independent.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| The dependent variable's distribution is typically assumed to be a Bernoulli distribution in logistic regression.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Show slide'''&lt;br /&gt;
&lt;br /&gt;
'''Advantages of Logistic Regression'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* It provides estimates of regression coefficients along with their standard errors.&lt;br /&gt;
* It also provides the predicted probability which in turn is used as a classifier.&lt;br /&gt;
* It doesn’t need explanatory variables to be necessarily continuous. &lt;br /&gt;
* In this sense, it is a more general classifier than LDA and QDA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Logistic regression offers a significant advantage in that continuous explanatory variables are not a requirement.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Show Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Implementation Of Logistic Regression'''&lt;br /&gt;
|| We will implement '''logistic regression''' using the '''Raisin '''dataset. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The additional reading material has more details on the '''Raisin dataset'''.&lt;br /&gt;
&lt;br /&gt;
Please refer to it.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Show slide '''&lt;br /&gt;
&lt;br /&gt;
'''Download Files '''&lt;br /&gt;
|| We will use a script file '''LogisticRegression.R '''and '''Raisin Dataset ‘raisin.xlsx’'''&lt;br /&gt;
&lt;br /&gt;
Please download these files from the''' Code files''' link of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Make a copy and then use them while practicing.&lt;br /&gt;
|- &lt;br /&gt;
|| [Computer screen]&lt;br /&gt;
&lt;br /&gt;
Highlight LogisticRegression.R &lt;br /&gt;
&lt;br /&gt;
Logistic Regression folder.&lt;br /&gt;
|| I have downloaded and moved these files to the '''Logistic Regression''' folder. &lt;br /&gt;
&lt;br /&gt;
This folder is located in the '''MLProject '''folder on the '''Desktop'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have also set the '''Logistic Regression''' folder as my Working Directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s create a '''Logistic Regression''' classifier model on the '''raisin''' dataset. &lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let us switch to '''RStudio'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Click LogisticRegression.R in RStudio&lt;br /&gt;
&lt;br /&gt;
Point to LogisticRegression.R in RStudio.&lt;br /&gt;
|| Open the script '''LogisticRegression.R''' in '''RStudio'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this, click on the script '''LogisticRegression.R.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Script '''LogisticRegression.R''' opens in '''RStudio'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Rstudio]&lt;br /&gt;
&lt;br /&gt;
Highlight the commands&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''library(readxl)'''&lt;br /&gt;
&lt;br /&gt;
'''library(caret)'''&lt;br /&gt;
&lt;br /&gt;
'''library(VGAM)'''&lt;br /&gt;
&lt;br /&gt;
'''library(ggplot2)'''&lt;br /&gt;
&lt;br /&gt;
'''library(dplyr)'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;#install.packages(“package_name”)&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Point to the command.'''&lt;br /&gt;
&lt;br /&gt;
|| Select and run these commands to import the necessary packages.&lt;br /&gt;
&lt;br /&gt;
The '''VGAM''' package contains the '''glm()''' function required to create our classifier.&lt;br /&gt;
&lt;br /&gt;
As I have already installed the packages.&lt;br /&gt;
&lt;br /&gt;
I have directly imported them. &lt;br /&gt;
|- &lt;br /&gt;
|| [RStudio]&lt;br /&gt;
&lt;br /&gt;
Highlight &lt;br /&gt;
&lt;br /&gt;
'''data &amp;lt;- read_xlsx(&amp;quot;Raisin_Dataset.xlsx&amp;quot;)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''data[c(&amp;quot;minorAL&amp;quot;,”ecc”,&amp;quot;class&amp;quot;)]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''data$class &amp;lt;- factor(data$class)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Highlight the commands.'''&lt;br /&gt;
|| These commands will load the '''Raisin dataset.'''&lt;br /&gt;
&lt;br /&gt;
They will also prepare the dataset for model building.&lt;br /&gt;
&lt;br /&gt;
Select and run the commands.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Drag boundary to see the Environment tab.&lt;br /&gt;
&lt;br /&gt;
Click on '''data '''on the Environment tab.&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
Click on '''data '''in the '''Environment '''tab.&lt;br /&gt;
&lt;br /&gt;
It loads the modified dataset in the '''Source''' window. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the data.&lt;br /&gt;
|| Now we split our dataset into training and testing data.&lt;br /&gt;
|- &lt;br /&gt;
|| [RStudio]&lt;br /&gt;
&lt;br /&gt;
'''set.seed(1) '''&lt;br /&gt;
&lt;br /&gt;
'''trainIndex&amp;lt;- sample(1:nrow(data),size=0.7*nrow(data),replace=FALSE) '''&lt;br /&gt;
&lt;br /&gt;
'''train &amp;lt;- data[trainIndex, ]'''&lt;br /&gt;
&lt;br /&gt;
'''test &amp;lt;- data[-trainIndex, ]'''&lt;br /&gt;
&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
In the '''Source''' window type these commands.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''set.seed(1) '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight&lt;br /&gt;
&lt;br /&gt;
'''trainIndex &amp;lt;- sample(1:nrow(data),size=0.7*nrow(data),replace=FALSE) '''&lt;br /&gt;
&lt;br /&gt;
Highlight&lt;br /&gt;
&lt;br /&gt;
'''train &amp;lt;- data[trainIndex, ]'''&lt;br /&gt;
&lt;br /&gt;
Highlight&lt;br /&gt;
&lt;br /&gt;
'''test &amp;lt;- data[-trainIndex, ]'''&lt;br /&gt;
&lt;br /&gt;
Click on Save and Run buttons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''train_data '''and '''test_data '''to load them in the Source window.&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
Select the commands and run them.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let us create a '''Logistic Regression '''model on the '''training dataset'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [RStudio]&lt;br /&gt;
&lt;br /&gt;
'''Logistic_model &amp;lt;- glm(class ~ ., data = train, family = &amp;quot;binomial&amp;quot;)'''&lt;br /&gt;
&lt;br /&gt;
'''summary(Logistic_model)$coef'''&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
In the '''Source''' window type these commands&lt;br /&gt;
|-&lt;br /&gt;
|  | Highlight glm()&lt;br /&gt;
&lt;br /&gt;
Highlight '''class ~ .'''&lt;br /&gt;
&lt;br /&gt;
Highlight '''family = binomial'''&lt;br /&gt;
&lt;br /&gt;
Highlight '''train''' &lt;br /&gt;
|| The function glm() represents generalized linear models. &lt;br /&gt;
&lt;br /&gt;
Logistic regression is among the class of models that it fits. &lt;br /&gt;
&lt;br /&gt;
This is the formula for our model. &lt;br /&gt;
&lt;br /&gt;
We try to predict target variable '''class''' based on '''minorAL '''and '''ecc '''features.&lt;br /&gt;
&lt;br /&gt;
This ensures that our model predicts the probability for 2 classes.&lt;br /&gt;
&lt;br /&gt;
It ensures that, out of all the models in glm, the logistic regression model is fit.&lt;br /&gt;
&lt;br /&gt;
This is the data used to train our model.&lt;br /&gt;
&lt;br /&gt;
Select the commands and run them.&lt;br /&gt;
&lt;br /&gt;
The output is shown in the '''console '''window.&lt;br /&gt;
|- &lt;br /&gt;
|| Drag boundary to see the console window.&lt;br /&gt;
|| Drag boundary to see the '''console '''window. &lt;br /&gt;
|- &lt;br /&gt;
|| Point the output in the '''console'''&lt;br /&gt;
&lt;br /&gt;
Highlight '''Coefficients'''&lt;br /&gt;
&lt;br /&gt;
Highlight '''Pr(&amp;gt;|z|)'''&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
'''Coefficients''' denote the coefficients of the logit function.&lt;br /&gt;
&lt;br /&gt;
That means the log-odds of class change by -0.04 for every unit change in minorAL.&lt;br /&gt;
&lt;br /&gt;
The lower p-values suggest that the effects are statistically significant.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Drag boundary to see the '''Source '''window.&lt;br /&gt;
|| Drag boundary to see the '''Source''' window.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let us now use our model to make predictions on test data.&lt;br /&gt;
|- &lt;br /&gt;
|| [RStudio]&lt;br /&gt;
&lt;br /&gt;
'''Predicted.prob &amp;lt;- predict(Logistic_model, test, type=&amp;quot;response&amp;quot;)'''&lt;br /&gt;
&lt;br /&gt;
'''View(Predicted.prob)'''&lt;br /&gt;
&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
In the '''Source''' window type these commands&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''Predicted.prob &amp;lt;- predict(Logistic_model, test, type=&amp;quot;response&amp;quot;)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight&lt;br /&gt;
&lt;br /&gt;
'''Type = “response” '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| This command provides the predicted probability of the logistic regression model on the test dataset.&lt;br /&gt;
&lt;br /&gt;
This command ensures the outcome is a probability.&lt;br /&gt;
&lt;br /&gt;
Select and run the commands&lt;br /&gt;
|- &lt;br /&gt;
|| Point&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Value&lt;br /&gt;
&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
'''Predicted.prob '''stores the predicted probability of each observation belonging to a certain class.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''predicted.classes &amp;lt;- factor(ifelse(predicted.prob &amp;gt; 0.5, &amp;quot;Kecimen&amp;quot;, &amp;quot;Besni&amp;quot;))'''&lt;br /&gt;
|| In the source window type the following commands&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight &lt;br /&gt;
&lt;br /&gt;
'''predicted.classes &amp;lt;- factor(ifelse(predicted.prob &amp;gt; 0.5, &amp;quot;Kecimen&amp;quot;, &amp;quot;Besni&amp;quot;))'''&lt;br /&gt;
|| This retrieves the predicted classes from the probabilities. &lt;br /&gt;
&lt;br /&gt;
If the probability is greater than 0.5 then '''Kecimen '''class otherwise '''Besni '''Class is chosen&lt;br /&gt;
&lt;br /&gt;
We also convert the output to a '''factor''' datatype to fit in the Confusion matrix function.&lt;br /&gt;
&lt;br /&gt;
Select and run the commands&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let us measure the accuracy of our model. &lt;br /&gt;
|- &lt;br /&gt;
|| '''confusion_matrix &amp;lt;- confusionMatrix(predicted.classes,test_data$class)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| In the '''Source''' window type these commands&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight the command '''confusionMatrix(predicted.classes,test_data$class)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the confusion in the Environment Tab&lt;br /&gt;
&lt;br /&gt;
Highlight the attribute&lt;br /&gt;
&lt;br /&gt;
'''table'''&lt;br /&gt;
|| This command creates a confusion matrix list.&lt;br /&gt;
&lt;br /&gt;
List is created from the actual and predicted class labels.&lt;br /&gt;
&lt;br /&gt;
And it is stored in the confusion_matrix variable.&lt;br /&gt;
&lt;br /&gt;
It helps to assess the classification model's performance and accuracy.&lt;br /&gt;
&lt;br /&gt;
Select and run these commands&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''plot_confusion_matrix &amp;lt;- function(confusion_matrix){'''&lt;br /&gt;
&lt;br /&gt;
'''tab &amp;lt;- confusion_matrix$table'''&lt;br /&gt;
&lt;br /&gt;
'''tab = as.data.frame(tab)'''&lt;br /&gt;
&lt;br /&gt;
'''tab$Prediction &amp;lt;- factor(tab$Prediction, levels = rev(levels(tab$Prediction)))'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''tab &amp;lt;- tab %&amp;gt;%'''&lt;br /&gt;
&lt;br /&gt;
'''rename(Actual = Reference) %&amp;gt;%'''&lt;br /&gt;
&lt;br /&gt;
'''mutate(cor = if_else(Actual == Prediction, 1,0))'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''tab$cor &amp;lt;- as.factor(tab$cor)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''ggplot(tab, aes(Actual,Prediction)) +'''&lt;br /&gt;
&lt;br /&gt;
'''geom_tile(aes(fill= cor),alpha = 0.4) + geom_text(aes(label=Freq)) +'''&lt;br /&gt;
&lt;br /&gt;
'''scale_fill_manual(values = c(&amp;quot;red&amp;quot;,&amp;quot;green&amp;quot;)) +'''&lt;br /&gt;
&lt;br /&gt;
'''theme_light() +'''&lt;br /&gt;
&lt;br /&gt;
'''theme(legend.position = &amp;quot;None&amp;quot;,'''&lt;br /&gt;
&lt;br /&gt;
'''line = element_blank()) +'''&lt;br /&gt;
&lt;br /&gt;
'''scale_x_discrete(position = &amp;quot;top&amp;quot;)'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| In the '''Source''' window type these commands&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Highlight '''the command &lt;br /&gt;
&lt;br /&gt;
'''tab &amp;lt;- confusion_matrix$table'''&lt;br /&gt;
&lt;br /&gt;
'''Highlight '''the command&lt;br /&gt;
&lt;br /&gt;
'''tab &amp;lt;- confusion_matrix$table'''&lt;br /&gt;
&lt;br /&gt;
'''tab = as.data.frame(tab)'''&lt;br /&gt;
&lt;br /&gt;
'''tab$Prediction &amp;lt;- factor(tab$Prediction, levels = rev(levels(tab$Prediction)))'''&lt;br /&gt;
&lt;br /&gt;
'''tab &amp;lt;- tab %&amp;gt;%'''&lt;br /&gt;
&lt;br /&gt;
'''rename(Actual = Reference) %&amp;gt;%'''&lt;br /&gt;
&lt;br /&gt;
'''mutate(cor = if_else(Actual == Prediction, 1,0))'''&lt;br /&gt;
&lt;br /&gt;
'''tab$cor &amp;lt;- as.factor(tab$cor)'''&lt;br /&gt;
&lt;br /&gt;
'''Highlight '''the command&lt;br /&gt;
&lt;br /&gt;
'''ggplot(tab, aes(Actual,Prediction)) +'''&lt;br /&gt;
&lt;br /&gt;
'''geom_tile(aes(fill= cor),alpha = 0.4) + geom_text(aes(label=Freq)) +'''&lt;br /&gt;
&lt;br /&gt;
'''scale_fill_manual(values = c(&amp;quot;red&amp;quot;,&amp;quot;green&amp;quot;)) +'''&lt;br /&gt;
&lt;br /&gt;
'''theme_light() +'''&lt;br /&gt;
&lt;br /&gt;
'''theme(legend.position = &amp;quot;None&amp;quot;,'''&lt;br /&gt;
&lt;br /&gt;
'''line = element_blank()) +'''&lt;br /&gt;
&lt;br /&gt;
'''scale_x_discrete(position = &amp;quot;top&amp;quot;)'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
|| These commands create a function '''plot_confusion_matrix '''to display the confusion matrix from the confusion matrix list created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It fetches the confusion matrix table from the list.&lt;br /&gt;
&lt;br /&gt;
It creates a data frame from the table which is suitable for plotting using '''GGPlot2'''.&lt;br /&gt;
&lt;br /&gt;
It plots the confusion matrix using the data frame created.&lt;br /&gt;
&lt;br /&gt;
It represents correct and incorrect predictions using different colors.&lt;br /&gt;
&lt;br /&gt;
Select and run the commands&lt;br /&gt;
|- &lt;br /&gt;
|| [RStudio]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''plot_confusion_matrix(confusion)'''&lt;br /&gt;
&lt;br /&gt;
|| Click on '''QDA.R''' in the '''Source '''window.&lt;br /&gt;
&lt;br /&gt;
In the '''Source''' window type this command&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
Highlight the command&lt;br /&gt;
&lt;br /&gt;
'''plot_confusion_matrix(confusion)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on''' Save '''and '''Run '''buttons.&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
We use the '''plot_confusion_matrix()''' function to generate a visual plot of the '''confusion matrix list created.'''&lt;br /&gt;
&lt;br /&gt;
Select and run the command&lt;br /&gt;
&lt;br /&gt;
The output is seen in the '''plot''' window&lt;br /&gt;
|- &lt;br /&gt;
|| '''Output in Plot window.'''&lt;br /&gt;
&lt;br /&gt;
|| This plot shows how well our model predicted the testing data.&lt;br /&gt;
&lt;br /&gt;
We observe that:&lt;br /&gt;
&lt;br /&gt;
'''21 '''misclassifications of Besni Class.&lt;br /&gt;
&lt;br /&gt;
'''13 '''misclassifications of Kecimen class.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| [RStudio]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''grid &amp;lt;- expand.grid(minorAL = seq(min(data$minorAL), max(data$minorAL), length = 500),'''&lt;br /&gt;
&lt;br /&gt;
'''ecc = seq(min(data$ecc), max(data$ecc), length = 500)) '''&lt;br /&gt;
&lt;br /&gt;
'''grid$prob &amp;lt;- predict(model, newdata = grid, type = &amp;quot;response&amp;quot;)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''grid$class &amp;lt;- ifelse(grid$prob &amp;gt; 0.5, 'Kecimen', 'Besni')'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''grid$classnum &amp;lt;- as.numeric(as.factor(grid$class))'''&lt;br /&gt;
&lt;br /&gt;
|| We will visualize the decision boundary of the model.&lt;br /&gt;
&lt;br /&gt;
In the '''Source''' window type these commands&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight the command&lt;br /&gt;
&lt;br /&gt;
'''grid &amp;lt;- expand.grid(minorAL = seq(min(data$minorAL), max(data$minorAL), length = 500),'''&lt;br /&gt;
&lt;br /&gt;
'''ecc = seq(min(data$ecc), max(data$ecc), length = 500)) '''&lt;br /&gt;
&lt;br /&gt;
'''grid$prob &amp;lt;- predict(model, newdata = grid, type = &amp;quot;response&amp;quot;)'''&lt;br /&gt;
&lt;br /&gt;
'''grid$class &amp;lt;- ifelse(grid$prob &amp;gt; 0.5, 'Kecimen', 'Besni')'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''grid$classnum &amp;lt;- as.numeric(as.factor(grid$class))'''&lt;br /&gt;
|| This code first generates a '''grid '''of points spanning the range of '''minorAL '''and '''ecc''' features in the dataset. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, it uses the '''Logistics Regression '''model to predict the probability of each point in this grid, storing these predictions as a new column ''''prob' '''in the '''grid '''dataframe. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It converts the predicted probabilities of he points into classes.&lt;br /&gt;
&lt;br /&gt;
If the probability exceeds 0.5 then '''Kecimen '''class otherwise '''Besni '''Class is chosen.&lt;br /&gt;
&lt;br /&gt;
The prediced classes are stored in ‘class’ column of grid data frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''as.numeric''' function encodes the predicted classes string labels into numeric values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select and run the commands&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on grid in the Environment tab to load the generated data in the Source window.&lt;br /&gt;
|- &lt;br /&gt;
|| [RStudio]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''ggplot() +'''&lt;br /&gt;
&lt;br /&gt;
'''geom_raster(data = grid, aes(x = minorAL, y = ecc, fill = class), alpha = 0.4) +'''&lt;br /&gt;
&lt;br /&gt;
'''geom_point(data = train_data, aes(x = minorAL, y = ecc, color = class)) +'''&lt;br /&gt;
&lt;br /&gt;
'''geom_contour(data = grid, aes(x = minorAL, y = ecc, z = classnum),'''&lt;br /&gt;
&lt;br /&gt;
'''colour = &amp;quot;black&amp;quot;, linewidth = 0.7) +'''&lt;br /&gt;
&lt;br /&gt;
'''scale_fill_manual(values = c(&amp;quot;#ffff46&amp;quot;, &amp;quot;#FF46e9&amp;quot;)) +'''&lt;br /&gt;
&lt;br /&gt;
'''scale_color_manual(values = c(&amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;)) +'''&lt;br /&gt;
&lt;br /&gt;
'''labs(x = &amp;quot;MinorAL&amp;quot;, y = &amp;quot;ecc&amp;quot;, title = &amp;quot;Logistic Regression Decision Boundary&amp;quot;) +'''&lt;br /&gt;
&lt;br /&gt;
'''theme_minimal()'''&lt;br /&gt;
&lt;br /&gt;
|| In the '''Source '''window type these commands &lt;br /&gt;
|- &lt;br /&gt;
|| Highlight the command&lt;br /&gt;
&lt;br /&gt;
'''ggplot() +'''&lt;br /&gt;
&lt;br /&gt;
'''geom_raster(data = grid, aes(x = minorAL, y = ecc, fill = class), alpha = 0.4) +'''&lt;br /&gt;
&lt;br /&gt;
'''geom_point(data = train_data, aes(x = minorAL, y = ecc, color = class)) +'''&lt;br /&gt;
&lt;br /&gt;
'''geom_contour(data = grid, aes(x = minorAL, y = ecc, z = classnum),'''&lt;br /&gt;
&lt;br /&gt;
'''colour = &amp;quot;black&amp;quot;, linewidth = 0.7) +'''&lt;br /&gt;
&lt;br /&gt;
'''scale_fill_manual(values = c(&amp;quot;#ffff46&amp;quot;, &amp;quot;#FF46e9&amp;quot;)) +'''&lt;br /&gt;
&lt;br /&gt;
'''scale_color_manual(values = c(&amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;)) +'''&lt;br /&gt;
&lt;br /&gt;
'''labs(x = &amp;quot;MinorAL&amp;quot;, y = &amp;quot;ecc&amp;quot;, title = &amp;quot;Logistic Regression Decision Boundary&amp;quot;) +'''&lt;br /&gt;
&lt;br /&gt;
'''theme_minimal()'''&lt;br /&gt;
&lt;br /&gt;
|| We are creating the decision boundary plot using GGPlot2 from the data generated. &lt;br /&gt;
&lt;br /&gt;
It plots the grid points with colors indicating the predicted classes. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The overall plot provides a visual representation of the decision boundary and the distribution of training data points of the '''model'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select and run these commands.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drag boundaries to see the plot window clearly.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| We can conclude that the decision boundary of logistic regression is a straight line.&lt;br /&gt;
&lt;br /&gt;
The line separates the data points clearly.&lt;br /&gt;
|- &lt;br /&gt;
|| Show slide&lt;br /&gt;
&lt;br /&gt;
Limitations of Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* It’s sensitive to outliers which can affect the accuracy of the classifier.&lt;br /&gt;
* It can perform poorly in the presence of multicollinearity among explanatory variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Here are some of the limitations of Logistic Regression&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let us summarize what we have learned.&lt;br /&gt;
|- &lt;br /&gt;
|| Show Slide&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
|| In this tutorial we have learned about:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Logistic Regression&lt;br /&gt;
* Assumptions of Logistic Regression&lt;br /&gt;
* Advantages of Logistic Regression&lt;br /&gt;
* Implementation of Logistic Regression in '''R''' using '''Raisin '''dataset'''.'''&lt;br /&gt;
* Model Evaluation.&lt;br /&gt;
* Visualization of the model Decision Boundary&lt;br /&gt;
* Limitations of Logistic Regression&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Now we will suggest an assignment for this Spoken Tutorial.&lt;br /&gt;
|- &lt;br /&gt;
|| Show Slide&lt;br /&gt;
&lt;br /&gt;
Assignment&lt;br /&gt;
|| &lt;br /&gt;
* Apply logistic regression on the '''Wine '''dataset. &lt;br /&gt;
* This dataset can be found in the '''HDclassif''' package. &lt;br /&gt;
* Install the package and import the dataset using the '''data()''' command.&lt;br /&gt;
* Measure the accuracy of the model&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Show slide&lt;br /&gt;
&lt;br /&gt;
About the Spoken Tutorial Project&lt;br /&gt;
|| The video at the following link summarizes the Spoken Tutorial project. Please download and watch it.&lt;br /&gt;
|- &lt;br /&gt;
|| Show slide&lt;br /&gt;
&lt;br /&gt;
Spoken Tutorial Workshops&lt;br /&gt;
|| We conduct workshops using Spoken Tutorials and give certificates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please contact us.&lt;br /&gt;
|- &lt;br /&gt;
|| Show Slide&lt;br /&gt;
&lt;br /&gt;
Spoken Tutorial Forum to answer questions&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|- &lt;br /&gt;
|| Show Slide&lt;br /&gt;
&lt;br /&gt;
Forum to answer questions&lt;br /&gt;
|| Do you have any general/technical questions?&lt;br /&gt;
&lt;br /&gt;
Please visit the forum given in the link.&lt;br /&gt;
|- &lt;br /&gt;
|| Show Slide&lt;br /&gt;
&lt;br /&gt;
Textbook Companion&lt;br /&gt;
|| The FOSSEE team coordinates the coding of solved examples of popular books and case study projects.&lt;br /&gt;
&lt;br /&gt;
We give certificates to those who do this.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit these sites.&lt;br /&gt;
|- &lt;br /&gt;
|| Show Slide&lt;br /&gt;
&lt;br /&gt;
Acknowledgment&lt;br /&gt;
|| The '''Spoken Tutorial''' was established by the Ministry of Education Govt of India. &lt;br /&gt;
|- &lt;br /&gt;
|| Show Slide&lt;br /&gt;
&lt;br /&gt;
Thank You&lt;br /&gt;
|| This tutorial is contributed by Yate Asseke Ronald. O and Debatosh Chakraborty from IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ushav</name></author>	</entry>

	</feed>