-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathindex.html
120 lines (106 loc) · 5.77 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<html>
<head>
<title>VisualML | Logistic Regression</title>
<link rel="shortcut icon" href="../img/favicon.ico" type="image/x-icon">
<style>
label{
font-size:3vh;
}
input{
font-size:3vh;
}
select{
font-size:3vh;
}
button{
border-radius: 20px;
border-color:#00FFFF;
background-color: #CCFFFF;
font-size:3vh;
}
pre {
overflow-x: auto;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
</style>
<script>
function update(d,c){
document.getElementById(c).innerHTML=Number(document.getElementById(d).value);
}
</script>
</head>
<body style="text-align:center;background-color:#EFEFEF;margin-top:0%;">
<p style="font-size:8vh;color:#DD3333;background-color:#FFEFEFCC;width:100%;position:fixed;margin-top:0%;padding-top:0.6%;">LOGISTIC REGRESSION</p>
<div id="body" style="text-align:center;width:60%;margin-left:20%;background-color:white;">
<br>
<br><br><br>
<pre style="text-align:left;margin-left:7%; width:86%; font-family:Times; font-size:1.3vw; color:#003333;">
Logistic regression is a classification algorithm used to assign observations to a discrete set of
classes. Unlike linear regression which outputs continuous number values, logistic regression
transforms its output using the logistic sigmoid function to return a probability value which
can then be mapped to two or more discrete classes.
<h3 style="background-color:#0000FF11">Types of Logistic Regression</h3>
1. <span style="text-decoration: underline;color:#FF3333;">Binary Logistic Regression</span>
The categorical response has only two 2 possible outcomes. Example: Spam or Not
2. <span style="text-decoration: underline;color:#FF3333;">Multinomial Logistic Regression</span>
Three or more categories without ordering. Example: Predicting which food is preferred
more (Veg, Non-Veg, Vegan)
3. <span style="text-decoration: underline;color:#FF3333;">Ordinal Logistic Regression</span>
Three or more categories with ordering. Example: Movie rating from 1 to 5
<h3 style="background-color:#0000FF11">Decision Boundary</h3>
To predict which class a data belongs, a threshold can be set. Based upon this threshold, the obtained estimated probability is classified into classes.
</pre>
<p style="font-family:fantasy; font-size:2.5vw;color:#334444;background-color:#77FF77">Visualization for decision boundary of 2 Classes</p>
<div style="display:block;">
<div style="width:20vw;margin-left:10vh;background-color:#EFEFEF;text-align:left;padding-left:3%;padding-top:3%;padding-bottom:2%;display:inline-block;float:left;" >
<label for="d">Polynomial Degree:</label><label id="dg"> 7</label><br><br>
<input type="range" id="d" name="points" min="1" max="11" onchange="update('d','dg');" value=7>
<div style="height:4vh;"></div>
<label for="r">Lambda (reg):</label><label id="rg"> 0</label><br><br>
<input type="range" id="r" name="points" min="0" max="20" onchange="update('r','rg');" value=0>
<div style="height:4vh;"></div>
<label for="r">Learning Rate:(10 power) </label><label id="lg">0</label><br><br>
<input type="range" id="l" name="points" min="-7" max="3" onchange="update('l','lg');" value=0>
<div style="height:4vh;"></div>
<label for="data">Dataset:</label>
<select name="cars" id="data" >
<option value="spiral">Spiral</option>
<option value="moon">Moons</option>
<option value="circle">Circles</option>
<option value="xor">XOR</option>
<option value="gauss">Gauss</option>
<option value="all">All</option>
</select>
<div style="height:3vh;"></div>
<button id='train' >Train</button>
</div>
<div style="height:29vh;width:30vw;padding-bottom:3%;"></div>
<br><br><br><br>
<div style="float:right;margin-right:3vw;">
<label for="res">Resol:</label>
<input id='res' value='130'></input><br><br>
<label for="epoch">Epoch:</label>
<input id='epoch' value='50'></input>
</div>
</div>
<br>
<div id="plt" style="clear:both;margin-top:15vh;font-family:fantasy; font-size:2.5vw;color:#334444;background-color:#FFFF00;">Plot Area</div>
<div id="barc" style='background-color:#BBBBBB;height:30px;width:60%;margin-left:20%;display:none;margin-top:5%;'>
<div id="bar" style='background-color:#3333FF;height:25px;width:0%;color:white;padding-top:5px;'>0%</div>
</div>
<div id="pl" style="height:60vh;width:50vw;margin-left:7vw;margin-top:5vh;display:none;"></div>
<div style="font-family:fantasy; font-size:2.5vw;color:#334444;clear:both;margin-top:10vh;background-color:#FFFF00;">Loss Area</div>
<br><br>
<div id='training' style="width:50vw;height:30vh;margin-left:7vw;display:none"></div>
<br><br>
DSG-IITR
</div>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-vis@1.0.2/dist/tfjs-vis.umd.min.js"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/tensorflow/1.2.7/tf.min.js'></script>
<script src="script.js" type="module"></script>
</body>
</html>