face2face.statistics.average_degree.global_avg_var_std¶
-
face2face.statistics.average_degree.
global_avg_var_std
(attr_degree_list)¶ Calculating global degree measures
Calculate the average, the variance and the standard deviation for the degrees of the whole data set.
- Parameters
attr_degree_list (list) – This list is the output of
avg_degree_attribute
.- Returns
measures – This list contains the average degree, the variance and the standard deviation for the degrees of the whole data set.
- Return type
list
Examples
You can use the output of the
avg_degree_attr()
method as input for this function. The return of this function is the average degree, the variance of the degree and the standard deviation for the degree of all attributes.>>> attr_degree_list = avg_degree_attr(test_df) >>> print(attr_degree_list) [['Age', 1.0, [1, 2, 2]], ['Age', 0.0, [3, 2]], ['Age', 2.0, [2, 2, 2]], ['Sex', 'F', [1, 2, 2, 2, 2]], ['Sex', 'M', [2, 2, 2]]] >>> measures = global_avg_var_std(attr_degree_list) >>> print(measures) [1.9777777777777779, 0.006049382716049409, 0.07777777777777795]
See also
face2face.avg_degree_attr()
,face2face.group_list_degree()