I have a setup where I have a directed graph $G = (V,E)$ and a node attributes vector $\overrightarrow{x}$ with $|\overrightarrow{x}| = |V|$ and $\forall x_i \in \overrightarrow{x}$, it holds $x_i \in [-1, +1]$.
I would like to measure the homophily in the network with respect to the opinion values of each node, that is, measuring if nodes are likely to be connected with other nodes with the same/close opinion value.
I think that a measure that could help me is the assortativity implemented in networkx, where you can find a numeric version and an attribute version. The numeric version can't be used because it requests integers and not floats, the attribute one doesn't throw any error, but I think it treats each value like a category without considering the real distance, therefore it is not proper for me.
I have found a similar thread, but it seems like a different problem.
Can you suggest me some other network homophily measures for my case?