-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
48 lines (48 loc) · 2.65 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>K-means algorithm visualization</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans&subset=latin-ext">
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Two-dimensional visualization of k-means clustering algorithm</h1>
<canvas width="1024" height="600"></canvas>
<div class="controls">
<dl class="controls-group">
<dt>Data points</dt>
<dd><button id="add-data-points-manually" data-toggle="Turn off adding manually">Add manually</button></dd>
<dd><button id="add-data-points-randomly">Add randomly</button> <input id="add-data-points-randomly-count"
value="100"> data point(s)</dd>
<dd><button id="remove-all-data-points">Remove all</button></dd>
</dl>
<dl class="controls-group">
<dt>Centroids</dt>
<dd><button id="add-centroids-manually" data-toggle="Turn off adding manually">Add manually</button></dd>
<dd><button id="add-centroids-randomly">Add randomly</button> <input id="add-centroids-randomly-count"
value="3"> centroid(s)</dd>
<dd><button id="remove-all-centroids">Remove all</button></dd>
</dl>
<dl class="controls-group">
<dt>Algorithm</dt>
<dd>1. <button id="reassign-data-points">Reassign data points</button></dd>
<dd>2. <button id="update-centroids-positions">Update centroids' positions</button></dd>
<dd class="top-division"><button id="run-steps-in-loop" data-toggle="Stop running steps in loop">Run steps
in loop</button> every <input id="run-steps-in-loop-milliseconds" value="1000"> millisecond(s)</dd>
<dd class="top-division"><label>Distance function:
<select id="distance-function">
<!-- filled from JS --></select>
</label></dd>
</dl>
</div>
<a href="https://github.com/hckr/k-means-visualization"><img
style="position: absolute; top: 0; right: 0; border: 0;"
src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
<script src="script.js"></script>
<script src="https://hckr.pl/topbar.js"></script>
<script src="https://hckr.pl/analytics.js"></script>
</body>
</html>