Class-Level Contagion Fragmentation Metric
Compute named class contagion from supplied class proportions and directed adjacency counts, omitting zero probability log terms; no raster processing/geodesy and adjacency counting convention must remain consistent.
Description
Class-level contagion combines class proportions with conditional directed adjacency.
Class-level contagion combines class proportions with conditional directed adjacency. The counting convention matters because it defines the joint probabilities used in entropy.1
Compute named class contagion from supplied class proportions and directed adjacency counts, omitting zero probability log terms; no raster processing/geodesy and adjacency counting convention must remain consistent.
When to use Class-Level Contagion Fragmentation Metric
Use this tool to compute named class contagion from supplied class proportions and directed adjacency counts, omitting zero probability log terms; no raster processing/geodesy and adjacency counting convention must remain consistent.
Gather the tree inventory, plot measurements or model parameters. Check diameter, area, time and moisture conventions; keep paired observations aligned.
How to use Class-Level Contagion Fragmentation Metric and understand its results
- Gather the tree inventory, plot measurements or model parameters. Check diameter, area, time and moisture conventions; keep paired observations aligned.
- Enter classProportions, directedAdjacencyCounts using the field table and calculation rules, then run the tool.
- Read contagionPercent, jointAdjacencyEntropyNats. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| classProportions | Class proportions | list of number | Required |
| directedAdjacencyCounts | Directed adjacency counts | list of list of number | Required |
Use at least two classes, positive proportions summing to one within 10⁻¹⁰ and an aligned square nonnegative integer adjacency matrix. Require each row total positive. Omit q=0 log terms and return contagion percent and joint entropy in nats.
q_ij=class proportion_i × adjacency_ij/row total_i; contagion %=100[1+Σq log q/(2log class count)] Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| contagionPercent | Contagion percent | number |
| jointAdjacencyEntropyNats | Joint adjacency entropy nats | number |
{
"input": {
"classProportions": [
0.5,
0.5
],
"directedAdjacencyCounts": [
[
1,
1
],
[
1,
1
]
]
},
"output": {
"contagionPercent": 0,
"jointAdjacencyEntropyNats": 1.3862943611198906
}
} Limitations and assumptions
The metric does not process rasters or infer geography. Class and directed-edge inventories must be consistent.
Numeric inputs and returned numeric values must be finite; an unrepresentable returned value produces an error. Matrices are limited to 128 rows and 128 entries per row; other numeric lists are limited to 100,000 entries. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Interior Forest Edge Ratio From Patch Size: Evaluate rectangular patch interior/edge areas under a caller uniform inward edge-depth model; no coordinate buffers, patch shape inference or biodiversity outcome; absent interior makes edge/interior ratio undefined. For a complementary task, use Understory Cover Percentage: Aggregate area-weighted understory point-layer cover, preserving overlapping layer totals separately from the union; unlike an existing single canopy-area percentage, multiple cover layers are not double counted in union.
References
Similar or alternative tools
- Interior Forest Edge Ratio From Patch Size
Evaluate rectangular patch interior/edge areas under a caller uniform inward edge-depth model; no coordinate buffers, patch shape inference or biodiversity outcome; absent interior makes edge/interior ratio undefined.
- Understory Cover Percentage
Aggregate area-weighted understory point-layer cover, preserving overlapping layer totals separately from the union; unlike an existing single canopy-area percentage, multiple cover layers are not double counted in union.