Could I please have some of the documentation elaborated on.

I have a signed, weighted graph (edges are floats ranging from -1 to 1) which I want to perform clustering on. Ideally, I want to search for exclusively assortative structures, so maximise the number/sum of positive edges within groups and maximise the number/sum of negative edges between groups.

I see I can search exclusively for assortative structures using the PPBlockstate.

I also see suggestions that I (a) either shift my weights to positive, or (b) add abs(weight) and sign as two separate covariates with normal and binomial distributions.

My question is does it make sense to combine these? It doesn’t seem that the covariates role in graph assortativity will necessarily be defined using this method.

Unfortunately, at the moment the strictly assortative model implemented in PPBlockState does not support edge covariates. For that, you need to use BlockState/NestedBlockState/etc, which will find arbitrary mixing patterns.

I plan to add this functionality in the future. If you want to keep track of this — and be notified — then please open a feature request at https://graph-tool.skewed.de/issues.

If you want to use BlockState/NestedBlockState in your case, then indeed you have several options.

For example, if your weights are in the open interval (-1,1) — i.e., the exact values -1 and +1 are not present — then you can:

Convert your weights from the range (-1,1) to (-\infty, \infty) with a transformation of the type y = \operatorname{arctanh}(x), and then you can use the "real-normal" edge covariate type.

Separate your covariates in two values x \to (s,y), where s=\operatorname{sign}(x)+1 \in \{0, 1\} and y=-\log(1-|x|)\in [0,\infty). For s you use "discrete-binomial" with M=1, and for y"real-exponential".

These amount to different generative models, and the most appropriate one will depend on your actual data.