Beispiel #1
0
def compare_networks(model_1, model_2, pos=None, showfig=True, figsize=(15,8), verbose=3):
    """Compare networks of two models.

    Parameters
    ----------
    model_1 : dict
        Results of model 1..
    model_2 : dict
        Results of model 2..
    pos : graph, optional
        Coordinates of the network. If there are provided, the same structure will be used to plot the network.. The default is None.
    showfig : bool, optional
        plot figure. The default is True.
    figsize : tuple, optional
        Figure size.. The default is (15,8).
    verbose : int, optional
        Print progress to screen. The default is 3.
        0: None, 1: ERROR, 2: WARN, 3: INFO (default), 4: DEBUG, 5: TRACE

    Returns
    -------
    tuple containing (scores, adjmat_diff)
        scores : Score of differences between the two input models.
        adjmat_diff : Adjacency matrix depicting the differences between the two input models.

    """
    [scores, adjmat_diff] = network.compare_networks(model_1['adjmat'], model_2['adjmat'], pos=pos, showfig=showfig, width=figsize[0], height=figsize[1], verbose=verbose)
    return(scores, adjmat_diff)
Beispiel #2
0
def compare_networks(adjmat_true,
                     adjmat_pred,
                     pos=None,
                     showfig=True,
                     width=15,
                     height=8,
                     verbose=3):
    [scores, adjmat_diff] = network.compare_networks(adjmat_true,
                                                     adjmat_pred,
                                                     pos=pos,
                                                     showfig=showfig,
                                                     width=width,
                                                     height=height,
                                                     verbose=verbose)
    return (scores, adjmat_diff)
Beispiel #3
0
def compare_networks(model_1,
                     model_2,
                     pos=None,
                     showfig=True,
                     figsize=(15, 8),
                     verbose=3):
    """Compare networks of two models.

    Parameters
    ----------
    model_1 : dict
        Results of model 1..
    model_2 : dict
        Results of model 2..
    pos : graph, optional
        Coordinates of the network. If there are provided, the same structure will be used to plot the network.. The default is None.
    showfig : bool, optional
        plot figure. The default is True.
    figsize : tuple, optional
        Figure size.. The default is (15,8).
    verbose : int, optional
        Print progress to screen. The default is 3.
        0: NONE
        1: ERROR
        2: WARNING
        3: INFO (default)
        4: DEBUG
        5: TRACE

    Returns
    -------
    dict.

    """
    [scores, adjmat_diff] = network.compare_networks(model_1['adjmat'],
                                                     model_2['adjmat'],
                                                     pos=pos,
                                                     showfig=showfig,
                                                     width=figsize[0],
                                                     height=figsize[1],
                                                     verbose=verbose)
    return (scores, adjmat_diff)