netrd/reconstruction/mutual_information_matrix.py
def find_product_probability_distribution(IndivP, N):
    """
    Assign each node j to a vector of length nbins where each element is the product of its own
    individual_probability_distribution and its neighbors'. P(x) * P(y) <-- as opposed to P(x,y)

    Params
    ------
    IndivP (dict): dictionary that gets output by find_individual_probability_distribution()
    N (int): number of nodes in the graph

    Returns
    -------
    ProduP (dict): a dictionary where the keys are nodes in the graph and the values
                         are nbins x nbins arrays corresponding to products of two probability vectors
    """

    ProduP = dict() # create a dict to put the product prob distributions into

    for l in range(N): # for each node
        for j in range(l): # for each possible edge (this method is symmetric)
            ProduP[(j,l)] = np.outer(IndivP[j], IndivP[l]) # outer product between two vectors

    return ProduP

    Assign each node j to a vector of length nbins where each element is the product of its own
    individual_probability_distribution and its neighbors'. P(x) * P(y) <-- as opposed to P(x,y)

    Params
    ------
    IndivP (dict): dictionary that gets output by find_individual_probability_distribution()
    N (int): number of nodes in the graph

    Returns
    -------
    ProduP (dict): a dictionary where the keys are nodes in the graph and the values
                         are nbins x nbins arrays corresponding to products of two probability vectors
    
Assign each node j to a vector of length nbins where each element is the product of its own
individual_probability_distribution and its neighbors'.

Params

IndivP (dict): dictionary that gets output by find_individual_probability_distribution()
N (int): number of nodes in the graph

Returns

ProduP (dict): a dictionary where the keys are nodes in the graph and the values
are nbins x nbins arrays corresponding to products of two probability vectors
Assign each node j to a vector of length nbins where each element is the product of its own individual_probability_distribution and its neighbors ' . Params IndivP ( dict ) : dictionary that gets output by find_individual_probability_distribution () N ( int ) : number of nodes in the graph Returns ProduP ( dict ) : a dictionary where the keys are nodes in the graph and the values are nbins x nbins arrays corresponding to products of two probability vectors
def find_product_probability_distribution(IndivP, N):
    ProduP = dict() 
    for l in range(N): 
        for j in range(l): 
            ProduP[(j,l)] = np.outer(IndivP[j], IndivP[l]) 
    return ProduP
def find_product_probability_distribution ( IndivP , N ) : ProduP = dict ( ) for l in range ( N ) : for j in range ( l ) : ProduP [ ( j , l ) ] = np . outer ( IndivP [ j ] , IndivP [ l ] ) return ProduP
Assign each node j to a vector of length nbins where each element is the product of its own
individual_probability_distribution and its neighbors'.
Assign each node j to a vector of length nbins where each element is the product of its own individual_probability_distribution and its neighbors ' .
"""
    Assign each node j to a vector of length nbins where each element is the product of its own
    individual_probability_distribution and its neighbors'. P(x) * P(y) <-- as opposed to P(x,y)

    Params
    ------
    IndivP (dict): dictionary that gets output by find_individual_probability_distribution()
    N (int): number of nodes in the graph

    Returns
    -------
    ProduP (dict): a dictionary where the keys are nodes in the graph and the values
                         are nbins x nbins arrays corresponding to products of two probability vectors
    """ # create a dict to put the product prob distributions into # for each node # for each possible edge (this method is symmetric) # outer product between two vectors
IndivP
N