ergmx.TiePredictions#

class ergmx.TiePredictions(network, tail, head, p, conditional, link)[source]#

Predicted tie probabilities of a model, one per dyad, as R’s predict(fit): tail, head (vertex numbers from 0, as igraph’s) and p. For several networks combined, network is each dyad’s network (from 0), and the vertex numbers are those of the combined network.

matrix()[source]#

An n x n array of the probabilities (symmetric if undirected), 0 on the diagonal and NaN for dyads that can’t be ties (within a mode of a bipartite network); a list of them, one per network, for several networks combined.

mean_by(attr)[source]#

The mean probability of the dyads between each pair of levels of a vertex attribute (from the tail’s to the head’s level, if directed).

to_frame()[source]#

The predictions as a pandas DataFrame: tail, head (and network), p.