Closed loreloc closed 1 week ago
thanks!
let's be consistent with nomenclature and substitute vtree
with region_graph
.
Maybe this function runs faster than floyd_warshall.
I used it for my own structures here.
I would also go for a chunked version of np.corrcoef, to avoid OOM.
nice, give it a try @gengala !
I'll try asap, quite busy these days :/
ah, if you need/want to double-check that your trees are correct you can check this file.
Anyway, isn't it better to have a function tree2region_graph
?
ah, if you need/want to double-check that your trees are correct you can check this file. Anyway, isn't it better to have a function
tree2region_graph
?
Yes indeed. Thank you!
There is an implementation in the clt
branch by @gengala . Some effort might be required to merge it though.
I am adding below the code (and tests) to learn a RG corresponding to an HCLT structure over continuous observed variables, as well as the code to construct a "linear" RG. Please add some documentation and check it is working.
cc @gengala
Note that the root of the tree is found by choosing the node that minimizes the median distance over all the other nodes. Are there other heuristics?