-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathhits.html
287 lines (267 loc) · 21 KB
/
hits.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
282
283
284
285
286
287
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module hits</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>hits</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/ubuntu/Documents/studies/3_1/IR_CS_F469/assn2/IR2/src/hits.py">/home/ubuntu/Documents/studies/3_1/IR_CS_F469/assn2/IR2/src/hits.py</a></font></td></tr></table>
<p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="igraph.clustering.html">igraph.clustering</a><br>
<a href="igraph.compat.html">igraph.compat</a><br>
<a href="igraph.configuration.html">igraph.configuration</a><br>
<a href="igraph.cut.html">igraph.cut</a><br>
<a href="igraph.datatypes.html">igraph.datatypes</a><br>
<a href="igraph.drawing.html">igraph.drawing</a><br>
</td><td width="25%" valign=top><a href="igraph.formula.html">igraph.formula</a><br>
<a href="gzip.html">gzip</a><br>
<a href="igraph.layout.html">igraph.layout</a><br>
<a href="igraph.matching.html">igraph.matching</a><br>
<a href="math.html">math</a><br>
<a href="matplotlib.patches.html">matplotlib.patches</a><br>
</td><td width="25%" valign=top><a href="numpy.html">numpy</a><br>
<a href="operator.html">operator</a><br>
<a href="os.html">os</a><br>
<a href="pickle.html">pickle</a><br>
<a href="matplotlib.pyplot.html">matplotlib.pyplot</a><br>
<a href="igraph.remote.html">igraph.remote</a><br>
</td><td width="25%" valign=top><a href="scipy.sparse.html">scipy.sparse</a><br>
<a href="igraph.statistics.html">igraph.statistics</a><br>
<a href="sys.html">sys</a><br>
<a href="time.html">time</a><br>
<a href="igraph.utils.html">igraph.utils</a><br>
<a href="igraph.vendor.html">igraph.vendor</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="builtins.html#object">builtins.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="hits.html#DatasetReader">DatasetReader</a>
</font></dt><dt><font face="helvetica, arial"><a href="hits.html#HITS">HITS</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="DatasetReader">class <strong>DatasetReader</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>An instance of <a href="#DatasetReader">DatasetReader</a> is used to read different files from the<br>
dataset<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="DatasetReader-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Initializes an instance of <a href="#DatasetReader">DatasetReader</a></tt></dd></dl>
<dl><dt><a name="DatasetReader-read_link_matrix"><strong>read_link_matrix</strong></a>(self, link_matrix_path, is_sparse=False)</dt><dd><tt>Returns the array (stored in a file) that represents the link matrix<br>
<br>
Args:<br>
link_matrix_path: Path to the file where the link matrix is stored<br>
is_sparse: True if the link matrix is stored as a sparse matrix</tt></dd></dl>
<dl><dt><a name="DatasetReader-read_map"><strong>read_map</strong></a>(self, map_path)</dt><dd><tt>Returns the dictionary (stored in a file) that represents a map<br>
from the link matrix index to user id<br>
<br>
Args:<br>
map_path: Path to the file where the map is stored</tt></dd></dl>
<dl><dt><a name="DatasetReader-read_users"><strong>read_users</strong></a>(self, users_path)</dt><dd><tt>Returns the dictionary (stored in a file) containing details of<br>
all users<br>
<br>
Args:<br>
users_path: Path to the file where info of all users is stored</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="HITS">class <strong>HITS</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>An instance of <a href="#HITS">HITS</a> is used to model the idea of hubs and authorities<br>
and execute the corresponding algorithm<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="HITS-__init__"><strong>__init__</strong></a>(self, link_matrix, users, index_id_map, is_sparse=False)</dt><dd><tt>Initializes an instance of <a href="#HITS">HITS</a><br>
<br>
Args:<br>
link_matrix: The link matrix<br>
users: Details of all users<br>
index_id_map: Dictionary representing a map from link matrix index<br>
to user id<br>
is_sparse: True if the links matrix is a sparse matrix</tt></dd></dl>
<dl><dt><a name="HITS-calc_scores"><strong>calc_scores</strong></a>(self, epsilon=0.0001)</dt><dd><tt>Calculates hubbiness and authority</tt></dd></dl>
<dl><dt><a name="HITS-get_all_auths"><strong>get_all_auths</strong></a>(self)</dt><dd><tt>Returns the authority score for each user for each iteration</tt></dd></dl>
<dl><dt><a name="HITS-get_all_hubs"><strong>get_all_hubs</strong></a>(self)</dt><dd><tt>Returns the hubbiness score for each user for each iteration</tt></dd></dl>
<dl><dt><a name="HITS-get_auths"><strong>get_auths</strong></a>(self)</dt><dd><tt>Returns the authority for each node (user)</tt></dd></dl>
<dl><dt><a name="HITS-get_hubs"><strong>get_hubs</strong></a>(self)</dt><dd><tt>Returns the hubbiness for each node (user)</tt></dd></dl>
<dl><dt><a name="HITS-get_names"><strong>get_names</strong></a>(self)</dt><dd><tt>Returns the screen name of each user</tt></dd></dl>
<dl><dt><a name="HITS-plot_graph"><strong>plot_graph</strong></a>(self, x, names, c)</dt><dd><tt>Plots the graph</tt></dd></dl>
<dl><dt><a name="HITS-plot_stats"><strong>plot_stats</strong></a>(self)</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-community_to_membership"><strong>community_to_membership</strong></a>(...)</dt><dd><tt><a href="#-community_to_membership">community_to_membership</a>(merges, nodes, steps, return_csize=False)</tt></dd></dl>
<dl><dt><a name="-convex_hull"><strong>convex_hull</strong></a>(...)</dt><dd><tt><a href="#-convex_hull">convex_hull</a>(vs, coords=False)<br>
<br>
Calculates the convex hull of a given point set.<br>
<br>
@param vs: the point set as a list of lists<br>
@param coords: if C{True}, the function returns the<br>
coordinates of the corners of the convex hull polygon,<br>
otherwise returns the corner indices.<br>
@return: either the hull's corner coordinates or the point<br>
indices corresponding to them, depending on the C{coords}<br>
parameter.</tt></dd></dl>
<dl><dt><a name="-cos"><strong>cos</strong></a>(...)</dt><dd><tt><a href="#-cos">cos</a>(x)<br>
<br>
Return the cosine of x (measured in radians).</tt></dd></dl>
<dl><dt><a name="-is_degree_sequence"><strong>is_degree_sequence</strong></a>(...)</dt><dd><tt><a href="#-is_degree_sequence">is_degree_sequence</a>(out_deg, in_deg=None)<br>
<br>
Returns whether a list of degrees can be a degree sequence of some graph.<br>
<br>
Note that it is not required for the graph to be simple; in other words,<br>
this function may return C{True} for degree sequences that can be realized<br>
using one or more multiple or loop edges only.<br>
<br>
In particular, this function checks whether<br>
<br>
- all the degrees are non-negative<br>
- for undirected graphs, the sum of degrees are even<br>
- for directed graphs, the two degree sequences are of the same length and<br>
equal sums<br>
<br>
@param out_deg: the list of degrees. For directed graphs, this list must<br>
contain the out-degrees of the vertices.<br>
@param in_deg: the list of in-degrees for directed graphs. This parameter<br>
must be C{None} for undirected graphs.<br>
@return: C{True} if there exists some graph that can realize the given degree<br>
sequence, C{False} otherwise.@see: L{<a href="#-is_graphical_degree_sequence">is_graphical_degree_sequence</a>()} if you do not want to allow multiple<br>
or loop edges.</tt></dd></dl>
<dl><dt><a name="-is_graphical_degree_sequence"><strong>is_graphical_degree_sequence</strong></a>(...)</dt><dd><tt><a href="#-is_graphical_degree_sequence">is_graphical_degree_sequence</a>(out_deg, in_deg=None)<br>
<br>
Returns whether a list of degrees can be a degree sequence of some simple graph.<br>
<br>
Note that it is required for the graph to be simple; in other words,<br>
this function will return C{False} for degree sequences that cannot be realized<br>
without using one or more multiple or loop edges.<br>
<br>
@param out_deg: the list of degrees. For directed graphs, this list must<br>
contain the out-degrees of the vertices.<br>
@param in_deg: the list of in-degrees for directed graphs. This parameter<br>
must be C{None} for undirected graphs.<br>
@return: C{True} if there exists some simple graph that can realize the given<br>
degree sequence, C{False} otherwise.<br>
@see: L{<a href="#-is_degree_sequence">is_degree_sequence</a>()} if you want to allow multiple or loop edges.</tt></dd></dl>
<dl><dt><a name="-main"><strong>main</strong></a>()</dt></dl>
<dl><dt><a name="-set_progress_handler"><strong>set_progress_handler</strong></a>(...)</dt><dd><tt><a href="#-set_progress_handler">set_progress_handler</a>(handler)<br>
<br>
Sets the handler to be called when igraph is performing a long operation.<br>
@param handler: the progress handler function. It must accept two<br>
arguments, the first is the message informing the user about<br>
what igraph is doing right now, the second is the actual<br>
progress information (a percentage).</tt></dd></dl>
<dl><dt><a name="-set_random_number_generator"><strong>set_random_number_generator</strong></a>(...)</dt><dd><tt><a href="#-set_random_number_generator">set_random_number_generator</a>(generator)<br>
<br>
Sets the random number generator used by igraph.<br>
@param generator: the generator to be used. It must be a Python <a href="builtins.html#object">object</a><br>
with at least three attributes: C{random}, C{randint} and C{gauss}.<br>
Each of them must be callable and their signature and behaviour<br>
must be identical to C{random.random}, C{random.randint} and<br>
C{random.gauss}. By default, igraph uses the C{random} module for<br>
random number generation, but you can supply your alternative<br>
implementation here. If the given generator is C{None}, igraph<br>
reverts to the default Mersenne twister generator implemented in the<br>
C layer, which might be slightly faster than calling back to Python<br>
for random numbers, but you cannot set its seed or save its state.</tt></dd></dl>
<dl><dt><a name="-set_status_handler"><strong>set_status_handler</strong></a>(...)</dt><dd><tt><a href="#-set_status_handler">set_status_handler</a>(handler)<br>
<br>
Sets the handler to be called when igraph tries to display a status<br>
message.<br>
<br>
This is used to communicate the progress of some calculations where<br>
no reasonable progress percentage can be given (so it is not possible<br>
to use the progress handler).<br>
<br>
@param handler: the status handler function. It must accept a single<br>
argument, the message that informs the user about what igraph is<br>
doing right now.</tt></dd></dl>
<dl><dt><a name="-sin"><strong>sin</strong></a>(...)</dt><dd><tt><a href="#-sin">sin</a>(x)<br>
<br>
Return the sine of x (measured in radians).</tt></dd></dl>
<dl><dt><a name="-warn"><strong>warn</strong></a>(...)</dt><dd><tt>Issue a warning, or maybe ignore it or raise an exception.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>ADJ_DIRECTED</strong> = 0<br>
<strong>ADJ_LOWER</strong> = 3<br>
<strong>ADJ_MAX</strong> = 1<br>
<strong>ADJ_MIN</strong> = 4<br>
<strong>ADJ_PLUS</strong> = 5<br>
<strong>ADJ_UNDIRECTED</strong> = 1<br>
<strong>ADJ_UPPER</strong> = 2<br>
<strong>ALL</strong> = 3<br>
<strong>BLISS_F</strong> = 0<br>
<strong>BLISS_FL</strong> = 1<br>
<strong>BLISS_FLM</strong> = 4<br>
<strong>BLISS_FM</strong> = 3<br>
<strong>BLISS_FS</strong> = 2<br>
<strong>BLISS_FSM</strong> = 5<br>
<strong>GET_ADJACENCY_BOTH</strong> = 2<br>
<strong>GET_ADJACENCY_LOWER</strong> = 1<br>
<strong>GET_ADJACENCY_UPPER</strong> = 0<br>
<strong>IN</strong> = 2<br>
<strong>Nexus</strong> = <igraph.remote.nexus.NexusConnection object><br>
<strong>OUT</strong> = 1<br>
<strong>REWIRING_SIMPLE</strong> = 0<br>
<strong>REWIRING_SIMPLE_LOOPS</strong> = 1<br>
<strong>STAR_IN</strong> = 1<br>
<strong>STAR_MUTUAL</strong> = 3<br>
<strong>STAR_OUT</strong> = 0<br>
<strong>STAR_UNDIRECTED</strong> = 2<br>
<strong>STRONG</strong> = 2<br>
<strong>TRANSITIVITY_NAN</strong> = 0<br>
<strong>TRANSITIVITY_ZERO</strong> = 1<br>
<strong>TREE_IN</strong> = 1<br>
<strong>TREE_OUT</strong> = 0<br>
<strong>TREE_UNDIRECTED</strong> = 2<br>
<strong>WEAK</strong> = 1<br>
<strong>arpack_options</strong> = <igraph.ARPACKOptions object><br>
<strong>config</strong> = <igraph.configuration.Configuration object><br>
<strong>dbl_epsilon</strong> = 2.220446049250313e-16<br>
<strong>debug</strong> = False<br>
<strong>known_colors</strong> = {'alice blue': (0.9411764705882353, 0.9725490196078431, 1.0, 1.0), 'aliceblue': (0.9411764705882353, 0.9725490196078431, 1.0, 1.0), 'antique white': (0.9803921568627451, 0.9215686274509803, 0.8431372549019608, 1.0), 'antiquewhite': (0.9803921568627451, 0.9215686274509803, 0.8431372549019608, 1.0), 'antiquewhite1': (1.0, 0.9372549019607843, 0.8588235294117647, 1.0), 'antiquewhite2': (0.9333333333333333, 0.8745098039215686, 0.8, 1.0), 'antiquewhite3': (0.803921568627451, 0.7529411764705882, 0.6901960784313725, 1.0), 'antiquewhite4': (0.5450980392156862, 0.5137254901960784, 0.47058823529411764, 1.0), 'aqua': (0.0, 1.0, 1.0, 1.0), 'aquamarine': (0.4980392156862745, 1.0, 0.8313725490196079, 1.0), ...}<br>
<strong>name</strong> = 'write_svg'<br>
<strong>palettes</strong> = {'gray': <GradientPalette with 256 colors>, 'heat': <AdvancedGradientPalette with 256 colors>, 'rainbow': <RainbowPalette with 256 colors>, 'red-black-green': <AdvancedGradientPalette with 256 colors>, 'red-blue': <GradientPalette with 256 colors>, 'red-green': <GradientPalette with 256 colors>, 'red-purple-blue': <AdvancedGradientPalette with 256 colors>, 'red-yellow-green': <AdvancedGradientPalette with 256 colors>, 'terrain': <AdvancedGradientPalette with 256 colors>}<br>
<strong>pi</strong> = 3.141592653589793</td></tr></table>
</body></html>