Global clustering coefficient for directed network - networkx

Global clustering coefficient gives an outline of the clustering in the entire network. From theory, this measure can be applied to both undirected and directed networks.
Networx library provides a function average_clustering(g) that calculates global clustering for undirected networks but not for directed ones. Is there a way to implement the global clustering coefficient for directed networks in Python or are there other libraries that do this?
Thanks
I searched for information to no avail, on stack overflow there is another very similar question but got no answer.

Related

Why is the rich-club coefficient algorithm not defined for directed networks in NetworkX?

I'm working with NetworkX to compute the rich-club coefficient of a directed graph. However, I see in the documentation for the implementation of this algorithm that it is not implemented for directed networks.
I want to know if there are any references to understand better the reason of this and develop a solution for my scenario (compute Rich-Club for Directed graphs).
I found this reference and it seems that they have proposed a corrected equation to compute it. But I haven't found any additional references to confirm if the rich-club was initially defined for just undirected graphs (not even in the references cited by the doc page of NetworkX).

Combine two neural networks with different inputs through element-wise summation of certain layers

I am looking at combining two Convolutional Neural Networks into one through element-wise summation of activation functions. Both these networks have different inputs, but are similar in their architecture.
I have seen from certain papers and github pages that this has been, successfully, implemented in Python. However, I was wondering if this would also be possible to implement in MATLAB?
One example of what I want to reproduce is the FuseNet architecture by Hazirbas et al. https://github.com/zanilzanzan/FuseNet_PyTorch:
Is it possible to reproduce this in MATLAB, and if so, how do I start?
You might be able to do this using a DAG network1,2 in MATLAB. Here's an illustration:
The element-wise summation, specifically, can be performed using an additionLayer.

Applying vector based clustering algorithms to social network context

i have a social network described as edges in a file. I used graph based clustering algorithms to find dense parts of the graph. However there is also vector based clustering which i need to apply to the data i have, but i can not find any context to this. I have also information about each node considering their features. I think using vectors containing the features of each user makes no sense here. For example k-Means would calculate the distance between user u1 with his feature vector v1 = [f1,f2,f3,..] and user u2 with its feature vector v2 = [f1,f2,f3,...]. However both vectors would have binary values depending on which feature the user has. Additionally i have a matrix with the users on one axis and the features on the other, where the user is able to set permission.
My Question is now, how i can make use of k-means, dbscan etc. in the context of this topic.
Best wishes.
Many algorithms can be modified to allow being used with distances for binary features. For example k-means can be modified for binary data: k-modes.
But I don't think it will do anything useful on your data.
You approach to this problem is bad: don't first decide the algorithm, then try to make it run. You are then bound to solve the wrong problem. Instead, formalize the problem first, in mathematics, what a good clustering would be. Then identify the appropriate algorithm by it's mathematical ability to find a good solution to this objective.

Spatial features and pattern analysis of a plan?

I am working on instances from the TSPLIB, which are simply coordinates of nodes in a plan. I'm looking to analyze spatial characteristics and features of a set of instances (e.g. clustered, not clustered, dispersed, etc) and I would like to implement some code in Matlab to analyze and compute specific features.
For example, so far, I have used Nearest Neighbor analysis to identify clusters, as well as quadrant analysis. Can anyone suggest any other spatial features and patterns that could be computed with some relatively simple code? Anybody maybe expert in the Traveling Salesman Problem. Thank you so much!
K-means is a very useful clustering tool that you can use.
https://www.mathworks.com/help/stats/kmeans.html
Nearest Neighbor is a classification methods. if you want to do classification you can use K Nearest Neighbors, SVM or Neural Networks Pattern recognition toolbox. these are all already in Matlab.
Also, check out Matlab Apps. there are some very cool clustering tools available as well with examples.

Find class probabilities in matlab PNN and make ROC plot

I have a Probablistic Neural Network classification experiment set up in MATLAB. I can get the classes for unseen data using the sim command. Is there any way I can get the probabilities for the classes that the classifier calculates? Also, is there any direct way to plot the Reciever Operating Characterstic curve and calculate the Area Under the ROC for my classifier?
if you have the Statistics Toolbox, you can use perfcurve function added in recent versions of MATLAB to plot ROC curves and get AUC.
You may have better luck getting a response if you include a little more background and define your terms. I recognize ROC as receiver operating characteristic curve, but PNN and AUC are just alphabet soup to me. Don't make the mistake of assuming that someone outside of your very specific problem domain cannot help you. You have to build a bit of a language bridge by explaining your jargon first, though. This has the added advantage of making this particular question more useful to the stackoverflow community at large when it is eventually answered.