analytics#
- predict_backend.ml.nlp.analytics.graph_stats(kg, use_nx=True, community_attr='Louvain Community')#
Computes various statistics of a networkX Graph,
- Parameters:
kg (
Graph
) – The knowledge graph (networkX object) on which compute the statisticsuse_nx (
bool
) – if True uses community_louvain to compute Louvain Communitiescommunity_attr (
str
) – used if use_nx=False. It is the feature to consider for the Louvain Communities
- Return type:
Optional
[Dict
]- Returns:
Dict with extracted features