-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathRocCurve.html
110 lines (97 loc) · 3.35 KB
/
RocCurve.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Demonstration of ROC curve</title>
<style type="text/css">
body{
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
}
.layout-wrapper{
max-width: 850px;
margin: auto;
}
input{
width: 60px;
margin-right: 20px;
}
.axis path,
.axis line {
fill: none;
stroke: black;
shape-rendering: crispEdges;
}
.axis text {
font-family: sans-serif;
font-size: 11px;
}
svg path {
fill: none;
stroke-width: 2;
}
.block1 {
background: none;
padding: 5px;
display: inline-block;
}
.block2 {
background: none;
padding: 5px;
display: inline-block;
}
.controls{
padding: 10px;
background-color: #cdf;
}
.thresholdLine{
cursor: ew-resize;
}
.pdf_area1{
fill: rgba(250, 100, 100, 0.2);
}
.pdf_area2{
fill: rgba(100, 100, 250, 0.2);
}
</style>
</head>
<body>
<div class="layout-wrapper">
<h2 style="padding-left: 20px;">
ROC curve demo
</h2>
<div class="controls">
<label for="mean1">mean #1:</label><input id="mean1" type = "number" size = "5" value = "0" onchange="draw()">
<label for="mean2">mean #2:</label><input id="mean2" type = "number" size = "5" value = "2" onchange="draw()">
<label for="var1">variance #1:</label><input id="var1" type = "number" size = "5" value = "4" onchange="draw()">
<label for="var2">variance #2:</label><input id="var2" type = "number" size = "5" value = "4" onchange="draw()">
</div>
<div id="renderer">
<!-- here all the plots will be rendered -->
</div>
<div style="padding: 20px;">
<h3>Instructions</h3>
<p>
On the right plot: two compared distributions (for demonstration normal distributions were taken).
</p>
<p>
On the left plot: corresponding
<a href="https://en.wikipedia.org/wiki/Receiver_operating_characteristic">ROC curve.</a>
</p>
<p>
Controls:
</p>
<ul>
<li>4 inputs with means and variances of distributions</li>
<li>Also vertical line corresponding to threshold can be moved</li>
</ul>
<p>
For detailed explanation see <a href="http://arogozhnikov.github.io/2015/10/05/roc-curve.html">this post</a>. <br />
Presentation was prepared by Oleg Alenkin and Alex Rogozhnikov.
</p>
</div>
</div>
<script src="/scripts/d3.min.js" charset="utf-8"></script>
<script src="/scripts/jquery-2.1.4.js" charset="utf-8"></script>
<script src="/scripts/roc_curve.js" charset="utf-8"></script>
</body>
</html>