Module Expr Str Import alias identifier ImportFrom alias Assign NameStore Str Assign NameStore ListLoad Str Str Str Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad NameLoad body Expr Str If BoolOpOr CompareEq Call NameLoad NameLoad AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareEq Call NameLoad NameLoad Num body Return TupleLoad Dict Dict If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpDiv Num Call AttributeLoad NameLoad attr orelse Assign NameStore NameLoad Assign NameStore BinOpDiv Num Call NameLoad Call AttributeLoad NameLoad attr For NameStore NameLoad body AugAssignMult SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Num While NameLoad body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num For NameStore NameLoad body For NameStore SubscriptLoad NameLoad Index NameLoad body AugAssignAdd SubscriptStore NameLoad Index NameLoad BinOpMult SubscriptLoad NameLoad Index NameLoad Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad attr Str Num For NameStore NameLoad body For NameStore SubscriptLoad NameLoad Index NameLoad body AugAssignAdd SubscriptStore NameLoad Index NameLoad BinOpMult SubscriptLoad NameLoad Index NameLoad Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad attr Str Num Assign NameStore BinOpDiv Num Call NameLoad Call AttributeLoad NameLoad attr For NameStore NameLoad body AugAssignMult SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore BinOpDiv Num Call NameLoad Call AttributeLoad NameLoad attr For NameStore NameLoad body AugAssignMult SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call NameLoad ListComp Call NameLoad BinOpSub SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad If CompareLt NameLoad NameLoad body Break If CompareGt NameLoad NameLoad body Raise Call NameLoad BinOpMod Str BinOpAdd NameLoad Num AugAssignAdd NameStore Num If NameLoad body Assign NameStore BinOpDiv Num Call NameLoad Call AttributeLoad NameLoad attr For NameStore NameLoad body AugAssignMult SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore BinOpDiv Num Call NameLoad Call AttributeLoad NameLoad attr For NameStore NameLoad body AugAssignMult SubscriptStore NameLoad Index NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return BinOpMult AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return BinOpMult NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Raise Call NameLoad Str If CompareEq Call NameLoad NameLoad Num body Return TupleLoad Dict Dict Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index NameLoad attr If NameLoad body Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr orelse Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num NameLoad body Expr Str TryExcept body Import alias Import alias identifier handlers ExceptHandler type NameLoad body Raise Call NameLoad Str If CompareEq Call NameLoad NameLoad Num body Return TupleLoad Dict Dict Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Call NameLoad NameLoad Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMult AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr TupleLoad NameLoad Num NameLoad Assign NameStore Num While NameLoad body Assign NameStore NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad attr If CompareLt NameLoad NameLoad body Break If CompareGt NameLoad NameLoad body Raise Call NameLoad BinOpMod Str BinOpAdd NameLoad Num AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad attr If NameLoad body Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias TryExcept body Import alias handlers ExceptHandler body Raise Call NameLoad Str TryExcept body Import alias handlers ExceptHandler body Raise Call NameLoad Str decorator_list
N/A N/A Hubs and authorities analysis of graph structure.
 N/A networkx nx networkx.exception NetworkXError N/A __author__ Aric Hagberg (hagberg@lanl.gov) N/A __all__ N/A hits hits_numpy hits_scipy authority_matrix hub_matrix hits N/A N/A G max_iter tol nstart normalized N/A 100 1e-08 None True N/A N/A Return HITS hubs and authorities values for nodes.

    The HITS algorithm computes two numbers for a node.
    Authorities estimates the node value based on the incoming links.
    Hubs estimates the node value based on outgoing links.

    Parameters
    ----------
    G : graph
      A NetworkX graph

    max_iter : interger, optional
      Maximum number of iterations in power method.

    tol : float, optional
      Error tolerance used to check convergence in power method iteration.

    nstart : dictionary, optional
      Starting value of each node for power method iteration.

    normalized : bool (default=True)
       Normalize results by the sum of all of the values.

    Returns
    -------
    (hubs,authorities) : two-tuple of dictionaries
       Two dictionaries keyed by node containing the hub and authority
       values.

    Examples
    --------
    >>> G=nx.path_graph(4)
    >>> h,a=nx.hits(G)

    Notes
    -----
    The eigenvector calculation is done by the power iteration method
    and has no guarantee of convergence.  The iteration will stop
    after max_iter iterations or an error tolerance of
    number_of_nodes(G)*tol has been reached.

    The HITS algorithm was designed for directed graphs but this
    algorithm does not check if the input graph is directed and will
    execute on undirected graphs.

    References
    ----------
    .. [1] A. Langville and C. Meyer,
       "A survey of eigenvector methods of web information retrieval."
       http://citeseer.ist.psu.edu/713792.html
    .. [2] Jon Kleinberg,
       Authoritative sources in a hyperlinked environment
       Journal of the ACM 46 (5): 604-32, 1999.
       doi:10.1145/324133.324140.
       http://www.cs.cornell.edu/home/kleinber/auth.pdf.
     N/A N/A N/A N/A type G N/A nx MultiGraph N/A N/A type G N/A nx MultiDiGraph N/A N/A N/A Exception hits() not defined for graphs with multiedges. N/A N/A N/A len G 0 N/A N/A N/A N/A N/A N/A N/A nstart None N/A N/A h N/A N/A dict fromkeys G N/A 1.0 N/A N/A G number_of_nodes N/A N/A h nstart N/A s N/A 1.0 N/A sum N/A N/A h values N/A k h N/A N/A N/A h N/A k s N/A i 0 N/A True N/A N/A hlast h N/A h N/A N/A dict fromkeys N/A N/A hlast keys 0 N/A a N/A N/A dict fromkeys N/A N/A hlast keys 0 N/A n h N/A N/A nbr N/A G N/A n N/A N/A N/A a N/A nbr N/A N/A hlast N/A n N/A N/A N/A N/A G N/A n N/A nbr get weight 1 N/A n h N/A N/A nbr N/A G N/A n N/A N/A N/A h N/A n N/A N/A a N/A nbr N/A N/A N/A N/A G N/A n N/A nbr get weight 1 N/A s N/A 1.0 N/A max N/A N/A h values N/A n h N/A N/A N/A h N/A n s N/A s N/A 1.0 N/A max N/A N/A a values N/A n a N/A N/A N/A a N/A n s N/A err N/A sum N/A N/A abs N/A N/A h N/A n N/A hlast N/A n N/A n h N/A N/A err tol N/A N/A N/A N/A i max_iter N/A N/A N/A NetworkXError N/A HITS: power iteration failed to converge in %d iterations. N/A i 1 N/A i 1 N/A normalized N/A N/A s N/A 1.0 N/A sum N/A N/A a values N/A n a N/A N/A N/A a N/A n s N/A s N/A 1.0 N/A sum N/A N/A h values N/A n h N/A N/A N/A h N/A n s N/A N/A h a N/A authority_matrix N/A N/A G nodelist N/A None N/A N/A Return the HITS authority matrix. N/A M N/A N/A nx to_numpy_matrix G nodelist nodelist N/A N/A N/A M T M N/A hub_matrix N/A N/A G nodelist N/A None N/A N/A Return the HITS hub matrix. N/A M N/A N/A nx to_numpy_matrix G nodelist nodelist N/A N/A M N/A M T N/A hits_numpy N/A N/A G normalized N/A True N/A N/A Return HITS hubs and authorities values for nodes.

    The HITS algorithm computes two numbers for a node.
    Authorities estimates the node value based on the incoming links.
    Hubs estimates the node value based on outgoing links.

    Parameters
    ----------
    G : graph
      A NetworkX graph

    normalized : bool (default=True)
       Normalize results by the sum of all of the values.

    Returns
    -------
    (hubs,authorities) : two-tuple of dictionaries
       Two dictionaries keyed by node containing the hub and authority
       values.

    Examples
    --------
    >>> G=nx.path_graph(4)
    >>> h,a=nx.hits(G)

    Notes
    -----
    The eigenvector calculation uses NumPy's interface to LAPACK.

    The HITS algorithm was designed for directed graphs but this
    algorithm does not check if the input graph is directed and will
    execute on undirected graphs.

    References
    ----------
    .. [1] A. Langville and C. Meyer,
       "A survey of eigenvector methods of web information retrieval."
       http://citeseer.ist.psu.edu/713792.html
    .. [2] Jon Kleinberg,
       Authoritative sources in a hyperlinked environment
       Journal of the ACM 46 (5): 604-32, 1999.
       doi:10.1145/324133.324140.
       http://www.cs.cornell.edu/home/kleinber/auth.pdf.
     N/A N/A N/A numpy np N/A N/A N/A ImportError N/A N/A N/A ImportError hits_numpy() requires NumPy: http://scipy.org/ N/A N/A N/A len G 0 N/A N/A N/A N/A N/A N/A H N/A N/A nx hub_matrix G N/A list G N/A N/A e ev N/A N/A N/A np linalg eig H N/A m N/A N/A N/A e argsort N/A -1 N/A h N/A N/A N/A N/A np array N/A ev N/A N/A N/A m flatten N/A A N/A N/A nx authority_matrix G N/A list G N/A N/A e ev N/A N/A N/A np linalg eig A N/A m N/A N/A N/A e argsort N/A -1 N/A a N/A N/A N/A N/A np array N/A ev N/A N/A N/A m flatten N/A normalized N/A N/A h N/A h N/A N/A h sum N/A a N/A a N/A N/A a sum N/A N/A h N/A h N/A N/A h max N/A a N/A a N/A N/A a max N/A hubs N/A dict N/A zip G N/A map float h N/A authorities N/A dict N/A zip G N/A map float a N/A N/A hubs authorities N/A hits_scipy N/A N/A G max_iter tol normalized N/A 100 1e-06 True N/A N/A Return HITS hubs and authorities values for nodes.

    The HITS algorithm computes two numbers for a node.
    Authorities estimates the node value based on the incoming links.
    Hubs estimates the node value based on outgoing links.

    Parameters
    ----------
    G : graph
      A NetworkX graph

    max_iter : interger, optional
      Maximum number of iterations in power method.

    tol : float, optional
      Error tolerance used to check convergence in power method iteration.

    nstart : dictionary, optional
      Starting value of each node for power method iteration.

    normalized : bool (default=True)
       Normalize results by the sum of all of the values.

    Returns
    -------
    (hubs,authorities) : two-tuple of dictionaries
       Two dictionaries keyed by node containing the hub and authority
       values.

    Examples
    --------
    >>> G=nx.path_graph(4)
    >>> h,a=nx.hits(G)

    Notes
    -----
    This implementation uses SciPy sparse matrices.

    The eigenvector calculation is done by the power iteration method
    and has no guarantee of convergence.  The iteration will stop
    after max_iter iterations or an error tolerance of
    number_of_nodes(G)*tol has been reached.

    The HITS algorithm was designed for directed graphs but this
    algorithm does not check if the input graph is directed and will
    execute on undirected graphs.

    References
    ----------
    .. [1] A. Langville and C. Meyer,
       "A survey of eigenvector methods of web information retrieval."
       http://citeseer.ist.psu.edu/713792.html
    .. [2] Jon Kleinberg,
       Authoritative sources in a hyperlinked environment
       Journal of the ACM 46 (5): 604-632, 1999.
       doi:10.1145/324133.324140.
       http://www.cs.cornell.edu/home/kleinber/auth.pdf.
     N/A N/A N/A scipy.sparse N/A numpy np N/A N/A N/A ImportError N/A N/A N/A ImportError hits_scipy() requires SciPy: http://scipy.org/ N/A N/A N/A len G 0 N/A N/A N/A N/A N/A N/A M N/A N/A nx to_scipy_sparse_matrix G nodelist N/A list G N/A N/A n m N/A M shape N/A A N/A N/A M T M N/A x N/A N/A N/A scipy ones N/A n 1 n N/A i 0 N/A True N/A N/A xlast x N/A x N/A A x N/A x N/A x N/A N/A x max N/A err N/A N/A N/A N/A scipy absolute N/A x xlast sum N/A N/A err tol N/A N/A N/A N/A i max_iter N/A N/A N/A NetworkXError N/A HITS: power iteration failed to converge in %d iterations. N/A i 1 N/A i 1 N/A a N/A N/A N/A N/A np asarray x flatten N/A h N/A N/A N/A N/A np asarray N/A M a flatten N/A normalized N/A N/A h N/A h N/A N/A h sum N/A a N/A a N/A N/A a sum N/A hubs N/A dict N/A zip G N/A map float h N/A authorities N/A dict N/A zip G N/A map float a N/A N/A hubs authorities N/A setup_module N/A N/A module N/A N/A nose SkipTest N/A N/A N/A numpy N/A N/A N/A N/A N/A SkipTest NumPy not available N/A N/A N/A scipy N/A N/A N/A N/A N/A SkipTest SciPy not available N/A