-
Notifications
You must be signed in to change notification settings - Fork 0
/
log.html
281 lines (269 loc) · 11.9 KB
/
log.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<!doctype html>
<html>
<head>
<!--
Interactive Analytics Library - An interaction based data modeling JavaScript
library. This project is maintained by the Visual Analytics Lab at Georgia Tech.
Authors: Bhargav Rajendra, Emily Wall and Arjun Srinivasan
This project is hosted on GitHub Pages and styled using the Ordered List (https://github.com/orderedlist) theme.
-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Interactive Analytics Library</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
<meta name="viewport" content="width=device-width">
</head>
<body>
<div class="wrapper">
<header>
<h1>Interactive Analytics Library</h1>
<p>An interaction based data modeling JavaScript library</p>
<p class="view"><a href="https://github.com/gtvalab/Interactive-Analytics-Library">View the Project on GitHub<small>gtvalab/Interactive-Analytics-Library</small></a></p>
<div class="header">
<ul>
<li>
<a href="https://github.com/gtvalab/Interactive-Analytics-Library/zipball/master">
Download<strong style="line-height: 130%;">ZIP File</strong>
</a>
</li>
<li>
<a href="https://github.com/gtvalab/Interactive-Analytics-Library/tarball/master">
Download<strong style="line-height: 130%;">TAR Ball</strong>
</a>
</li>
<li>
<a href="https://github.com/gtvalab/Interactive-Analytics-Library">
Fork On <strong style="line-height: 130%;">GitHub</strong>
</a>
</li>
</ul>
</div>
<div class="menu">
<ul>
<li><a href="./index.html">Overview</a></li>
<li><a href="./initial.html">Initialization</a></li>
<li><a class="active" href="./log.html">Logging</a></li>
<li><a href="./usermodel.html">User Model</a></li>
<li><a href="./analytics.html">Analytics</a></li>
</ul>
</div>
</header>
<section>
<h2>Logging is under construction</h2>
<!--
<h2>Interaction Weight Vectors</h2>
<p>
IAL's core is based on the interaction weight concept. User interest is modeled and approxmited in IAL, using two weight vectors.
<ol>
<li>An attribute weight vector</li>
<li>An item weight vector</li>
</ol>
Combining the two vectors, IAL generates an item score that signifies how important a data point is. On initialization, IAL generates default attribute weight and item weights as identity vectors, and also generates the corresponding item scores. These values are bound to the data directly in the DOM as an ial object.
</p>
<pre><code>ial: {
"id": 0,
"itemScore": 4.1389,
"weight": 1
}</code></pre>
<h2>Modifying Weight Vectors</h2>
<p>
The power to update and modify weight vectors based on interactions is given completely to the developer. We realize that each Visual Analytic toolkit has different goals, and the behavior of the weight vectors must be set according. For fine grained control of the weight vectors, we provide the following <i>getter</i> and <i>setter</i> methods.
</p>
<ul>
<li>
<p>
<h4>Attribute Weights, based on Similarity</h4>
<p>Finding similar or dissimilar points is a very commonly required task in visual analytics. IAL provides easy access to updating attributes, based on how similar or dissimilar points.</p>
<pre><code>ial.generateAttributeWeightVectorUsingSimilarity(<i>[points]</i>);</code></pre>
<p>This method allows developers to modify the attribute weight vector directly, based on the similarity of a set of points. The method does not return any values, as it directly modifies the attribure weight vector. By default, the method operates on all points in the data set. This behavior can be modified by optionally passing an array of data objects that you want the method to work on.</p>
<p>The other side of the same coin, is generating attribute weights based on how dissimilar a set of points are. IAL allows you to pass an array of points, and can generate the attribute weight vector based on the variance of each attribute.
</p>
<pre><code>ial.generateAttributeWeightVectorUsingDifferences([points]);</code></pre>
<p>IAL can also generate dissimilarity scores between two user-defined clusters of points. To do so, an additional array of points can be passed, and IAL can determine the attribute weight vector based on the difference between <i>set 1</i> and <i>set 2</i>.
</p>
<pre><code>ial.generateAttributeWeightVectorUsingDifferences([set1],
[set2]);</code></pre>
<p>The dissimilarity between the two sets is once again determined the variance of each attribute of the data points.
</li>
<li>
<p>
<h4>Accessing Item Weights</h4>
<p>Item weights can be directly accessed and added to any event handler. We provide the following methods to do so.
</p>
<pre><code>ial.getItemWeight(ial.id);
ial.setItemWeight(ial.id, newWeight);
ial.incrementItemWeight(ial.id, <i>incrementBy</i>);
</code></pre>
<p>To access the item weights, these methods require the item identifier. This identifier is attached to each data item on initialization.</p>
</p>
</li>
<li>
<p>
<h4>Accessing Attribute Weights</h4>
<p>Similarly, attribute weights can be directly accessed and added to any event handler. We provide the following methods to do so.
</p>
<pre><code>ial.getAttributeWeight(attributeName);
ial.setAttributeWeight(attributeName, newWeight);
ial.incrementAttributeWeight(attributeName, <i>incrementBy</i>);
</code></pre>
<p>To access the attribute weights, these methods require the attribute identifier. This identifier is defined by the dataset used; key names from the data's JSON object are used to uniquely identify each attribute.</p>
</p>
</li>
</ul>
<h2>Helper Analytic Methods</h2>
<p>In addition to accessor methods for modifying the weight vectors, IAL also provides a number of helper analytic methods for the developer.
</p>
<table>
<tbody>
<tr>
<th>Category</th>
<th>Method</th>
</tr>
<tr>
<td rowspan="3">Sorting</td>
<td><code>ial.getTopNItemsByInteractionWeights(N)</code></td>
</tr>
<tr>
<td><code>ial.getTopNItemsByScores(N)</code></td>
</tr>
<tr>
<td><code>ial.getNSimilarItems(dataItem, N)</code></td>
</tr>
<tr>
<td rowspan="3">Logging</td>
<td><code>ial.getSessionLogs(startTime, endTime)</code></td>
</tr>
<tr>
<td><code>ial.getDataItemLogs([ids])</code></td>
</tr>
<tr>
<td><code>ial.getAttributeLogs([attributes])</code></td>
</tr>
<tr>
<td>Analytics</td>
<td><code>ial.createClusters([data],k)</code></td>
</tr>
</tbody>
</table>
<p>The function descriptions are provided below.</p>
<pre><code>
<span class="comments">/*
* Input: An integer N, which is expected to be greater than 0.
* Returns an array of N data items, sorted by their respective
* item weights.
*
*/
</span> ial.getTopNItemsByInteractionWeights(N);
<span class="comments">
<hr class="commentsSeparator"/>
/*
* Input: An integer N, which is expected to be greater than 0.
* Returns an array of N data items, sorted by their respective
* item scores.
*
* The item scores are generated by computing the product of the
* attribute weight vector and the item weight vector's transpose.
* Item Score = Weight Vector * Item Weight * [Identity Vector]<sup>T</sup>
* Item scores are precached for each data point, and the method
* returns the top N data points based on this score.
*
*/
</span> ial.getTopNItemsByScores(N);
<span class="comments">
<hr class="commentsSeparator"/>
/*
* Input: A data item which acts as the pivot for similarity
* computation, and an integer N that is greater than zero. The
* method returns an array of N data items, sorted by their
* respective similarity scores.
*
*/
</span> ial.getNSimilarItems(dataItem, N);
<span class="comments">
<hr class="commentsSeparator"/>
/*
* Input: The start and end times in epoch milliseconds. End time is
* expected to be greater than start time. The method returns all
* available logs for all data items, if they fall in the specified
* time block. Each log object in the list is a dictionary with the
* following keys.
*
* {
* dataItem; (The data object that was interacted with)
* eventName; (The event or interaction that was performed)
* oldWeight; (Data item weight before the interaction)
* newWeight; (Data item weight after the interaction)
* customLogInfo; (KV pairs pairs for app-specific needs)
* eventSpecificInfo; (KV pairs pairs for event-specific needs)
* }
*
*/
</span> ial.getSessionLogs(startTime, endTime)
<span class="comments">
<hr class="commentsSeparator"/>
/*
* Input: An array of data item identifiers. The method returns
* all available logs for the given set of data items. Each log
* object in the list is a dictionary with the following keys.
*
* {
* dataItem; (The data object that was interacted with)
* eventName; (The event or interaction that was performed)
* oldWeight; (Data item weight before the interaction)
* newWeight; (Data item weight after the interaction)
* customLogInfo; (KV pairs pairs for app-specific needs)
* eventSpecificInfo; (KV pairs pairs for event-specific needs)
* }
*
*/
</span> ial.getDataItemLogs([ids])
<span class="comments">
<hr class="commentsSeparator"/>
/*
* Input: An array of attribute identifiers. The method returns
* all available logs for the given set of attributes. Each log
* object in the list is a dictionary with the following keys.
*
* {
* dataItem; (The data object that was interacted with)
* eventName; (The event or interaction that was performed)
* oldWeight; (Data item weight before the interaction)
* newWeight; (Data item weight after the interaction)
* customLogInfo; (KV pairs pairs for app-specific needs)
* eventSpecificInfo; (KV pairs pairs for event-specific needs)
* }
*
*/
</span> ial.getAttributeLogs([attributes])
<span class="comments">
<hr class="commentsSeparator"/>
/*
* Input: An optional array of the data objects to be clustered.
* This defaults to the entire dataset if the optional array is
* not provided. Additionally, the method also takes the cluster
* threshold as a parameter. Ideal values for the threshold are
* in the range of [0.01, 1]. The function returns an array of
* cluster objects. Each cluster object is of a dictionary with
* the following keys.
*
* {
* clusterId; (An integer to uniquely identify each cluster)
* clusterLabel; (A string, to provide a human readable name)
* dataItems = []; (An array of data items in the cluster)
* }
*
*/
</span> ial.createClusters([data], k)
</code></pre>
<h1>Acknowledgements</h1>
This project is funded in part by Georgia Tech School of Interactive Computing, and the Pacific Northwest National Laboratory Analysis in Motion Initiative.
-->
</section>
<footer>
<p>This project is maintained by<br/><a href="http://vis.gatech.edu">The Visual Analytics Lab at Georgia Tech</a></p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>
</body>
</html>