-
Notifications
You must be signed in to change notification settings - Fork 20
Interpretation probabilistic network #122
Comments
Well, it's a question I've been pondering for a long while, because it also ties into "neutral" networks, where the probability of an interaction is pi x pj where pi and pj are the relative species abundance, and so the sum of the matrix is 1 too. The problem is that these are not really networks, or at least that these are not probability, and instead the entire matrix is a distribution. As far as I can tell, this may be solved by using either |
The discussion is also relevant in terms of the optimal transport stuff. I like to think of it as the fraction of the interactions (or energy) that species i takes from species j etc. The current interpretation is of course a different, but equally relevant, interpretation. Currently, I wrote functions that take a double stochastic matrix as input to compute the indices, without performing checks. Then I wrapped a function that takes any subtype function entropy(P::AbstractArray)
return - sum(P .* safelog.(P))
end
function make_joint_distribution(N::NT) where {NT<:AbstractEcologicalNetwork}
(typeof(N) <: QuantitativeNetwork) ⊻ any(N.A .≥ 0) || throw(DomainError("Information only for nonnegative interaction values"))
return N.A / sum(N.A)
end
function entropy(N::NT) where {NT<:AbstractEcologicalNetwork}
P = make_joint_distribution(N)
return entropy(P)
end However, I think that a new subtype |
Can you make a few tests with a new type? I'm not strongly opposed to the idea if it makes the information theory things easier. |
I will do so in a separate branch. For the moment i suggest letting the
information module working without it though.
…On Mon, 12 Nov 2018, 17:44 Timothée Poisot ***@***.*** wrote:
Can you make a few tests with a new type? I'm not strongly opposed to the
idea if it makes the information theory things easier.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#122 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFvXow2Ne76TJtMEY6U4gnBYc7zAq4bfks5uuaOzgaJpZM4YZnFM>
.
|
This is related to the module
information
we are building. All methods related to information theory work on distributions, i.e. the adjacency or incidence matrix is transformed in a double stochastic matrix P, where all values are nonnegative and the sum to 1.The data type
ProbabilisticNetwork
interprets every interaction however as a probability of a Bernoulli trial, i.e. the restriction is that all values are in [0, 1].So, for the information theory, either:
StochasticNetwork
, as in the first definition;ProbabilisticNetwork
, meaning that it satisfies the first definitionLikely, the last option is the best, unless there is some more general reason to work with the representation as a distribution?
The text was updated successfully, but these errors were encountered: