xgi.stats.DiNodeStat#
- class DiNodeStat(network, view, func, args=None, kwargs=None)[source]#
Bases:
IDStat
An arbitrary node-quantity mapping.
NodeStat objects represent a mapping that assigns a value to each node in a network. For more details, see the tutorial.
Attributes
name
Name of this stat.
Methods
asdict
Output the stat as a dict.
aslist
Output the stat as a list.
asnumpy
Output the stat as a numpy array.
aspandas
Output the stat as a pandas series.
ashist
Return the distribution of a numpy array.
max
The maximum value of this stat.
mean
The arithmetic mean of this stat.
median
The median of this stat.
min
The minimum value of this stat.
std
The standard deviation of this stat.
var
The variance of this stat.
moment
The statistical moments of this stat.
argmin
The ID corresponding to the minimum of the stat
argmax
The ID corresponding to the maximum of the stat
argsort
Get the list of IDs sorted by stat value.