Description Usage Arguments Value Examples
The maximum entropy solution is obtained by spreading the edge weights as evenly as possible throught the weighted adjacency matrix. This version forces the diagonal elements to be zero along with any rows (columns) that have a zero row (column) sum in the input.
Missing values are allowed but will result in a warning. The usefulness of such results is up to the user.
1 2 3 4 5 6 7 | max_entropy(rs, ...)
## S3 method for class 'data.frame'
max_entropy(rs, ...)
## S3 method for class 'numeric'
max_entropy(rs, cs, minError = 1e-18, ...)
|
rs |
Either a data.frame object containing row sums (first) and column sums
(second) and optionally a vector of node names in any column. Or a vector of row
sums only if the column sums, |
... |
extra arguments passed to |
cs |
NumericVector the column sums of the matrix. |
minError |
Numeric. The algorithm will keep iterating until the mean squared error against the constraints drops below this value. |
A matrix that satisfies the row and column sum constraints or FALSE
if the algorithm failed to converge. Dimension names will be pulled through
if available from the data
or from the names of rs
.
1 2 | max_entropy(neast)
max_entropy(neast$outSum, neast$inSum)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.