ArnaoutLab / diversity

Partitioned frequency- and similarity-sensitive diversity in Python
MIT License
6 stars 1 forks source link

surface p and Zp vectors in API #95

Open chhotii-alex opened 1 month ago

chhotii-alex commented 1 month ago

These intermediate products of calculation are useful: the normalized abundance vectors, and the products of Z with these (the Zp vectors.)

These are not _in_accessible through the API currently-- After all, there are no private member variables in Python, and we don't call del on these. After instantiating a Metacommunity object m with the abundance matrix and whatever it needs to make the similarity matrix, you can access the p(x) as m.abundance.normalized_subcommunity_abundance[:,p_index] and the Zp and Zq vectors as m.components.normalized_subcommunity_similarity[:,p_index] and m.components.normalized_subcommunity_similarity[:,q_index].

However, this is not obvious, and the member names are confusing. Trivially, we can make this deliberately visible in the Metacommunity's interface, with sensible names.

What should the sensible names be?