Analysis
jaxonomy.analysis
Whole-model analysis on top of the framework's dependency structure.
The influence graph merges the model's leaf-level dependency DAG (which says whether information flows) with autodiff Jacobians (which say how much), giving quantitative model slicing, chain-rule path attribution, bottleneck detection, and dead-edge diagnostics on one queryable object.
InfluenceGraph
dataclass
A model's dependency structure with autodiff-computed edge weights.
Build with :func:influence_graph; see this module's docstring for the
weighting conventions the numbers obey.
Attributes:
| Name | Type | Description |
|---|---|---|
system |
Any
|
The analyzed |
graph |
DiGraph
|
The underlying |
tau |
float
|
Time scale applied to continuous-state-rate edges, in seconds. |
normalize |
str
|
|
scale_floor |
float
|
Lower bound on a signal's magnitude when normalizing. |
at |
str
|
|
times |
Optional[ndarray]
|
Snapshot times in trajectory mode, else None. |
reduce |
str
|
How a trajectory profile became the scalar weight. |
block_notes |
Dict[str, Dict[str, str]]
|
Per-block explanations for anything not differentiated. |
Source code in jaxonomy/analysis/influence.py
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 | |
attribute(target, source, *, threshold=1e-06, max_depth=32, max_paths=512)
Decompose source's influence on target path by path.
Each path's contribution is the chain-rule product of its edge weights; the signed sum over paths is the end-to-end sensitivity, which is where cancellation between two routes shows up as a total far below the largest single path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
Destination node (id, port, or fragment). |
required | |
source
|
Origin node. |
required | |
threshold
|
float
|
Prune a path once |
1e-06
|
max_depth
|
int
|
Maximum path length. |
32
|
max_paths
|
int
|
Stop after this many paths and mark the result truncated, rather than enumerating a combinatorial blow-up. |
512
|
Source code in jaxonomy/analysis/influence.py
1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 | |
bottlenecks(target, *, threshold=0.01, max_depth=32)
Nodes every influential path to target must pass through.
Computed on the slice at threshold: a node is a bottleneck when
deleting it disconnects at least one slice origin from target. These
are the signals worth instrumenting, and the single points of failure in
a redundancy argument.
Returns a bare list, so it has nowhere to report that the underlying
slice was truncated — a truncated slice is missing paths, and a missing
path is exactly what turns a non-bottleneck into an apparent one. That
case warns instead; take the slice yourself and check
:attr:InfluenceSlice.truncated if you need to handle it.
Source code in jaxonomy/analysis/influence.py
1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 | |
dead_edges(threshold=0.0)
Structural edges that transmit no influence at this operating point.
A wire the model declares and the mathematics ignores: a gain of zero, a saturated nonlinearity, a term that cancels. This is the quantitative form of a dead-store warning — the connection is real, the influence is not. Edges with no local gradient are excluded (unknown is not dead), and so are the state self-loops, whose zero A block is the definition of a plain integrator rather than a defect.
Source code in jaxonomy/analysis/influence.py
1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 | |
dominant_paths(target, k=5, *, source=None, threshold=1e-06, max_depth=32, max_paths=512)
The k strongest paths into target (optionally from source).
With no source, every node with no in-edges inside the search — the
model's genuine independent inputs and states — is used as an origin.
Source code in jaxonomy/analysis/influence.py
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 | |
nodes_at_scale_floor()
Signals whose normalizer came from scale_floor, not from a value.
A relative weight divides by the signal's magnitude, so a signal that is
(near) zero at the operating point — an error signal at equilibrium, an
integrator state at t=0 — produces an elasticity governed by
scale_floor rather than by the model. Those weights are not wrong so
much as meaningless, and they are large, so they dominate any ranking.
Source code in jaxonomy/analysis/influence.py
1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 | |
relative_threshold(target, fraction=0.01, *, direction='backward', max_depth=32, floor=1e-12)
A threshold set at fraction of the strongest influence on target.
An absolute threshold only reads as a percentage when tau is
comparable to the time constants on the paths involved (see the module
docstring). Scaling to the strongest score makes "keep what carries at
least 1% of what the dominant contributor carries" mean the same thing at
any tau.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
Node id, port object, or name fragment. |
required | |
fraction
|
float
|
Fraction of the strongest score to keep. |
0.01
|
direction
|
str
|
As in :meth: |
'backward'
|
max_depth
|
int
|
As in :meth: |
32
|
floor
|
float
|
Threshold the reference sweep runs at, and the value returned
when nothing upstream carries influence. It is passed to the
search rather than left at zero so the sweep stays pruned; a
model whose strongest contributor falls below it would yield
|
1e-12
|
Returns:
| Type | Description |
|---|---|
float
|
A threshold to pass to :meth: |
Source code in jaxonomy/analysis/influence.py
880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 | |
resolve(spec)
Turn a port object, locator, or name fragment into a node id.
Accepts an exact node id, an InputPort / OutputPort, a
(system, port_index) locator, or any unambiguous suffix of a node
id ("integ:out:out_0", "integ", "out:y").
Source code in jaxonomy/analysis/influence.py
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | |
slice(target, threshold=0.01, *, direction='backward', max_depth=32)
Quantitative model slice: what influences target by ≥ threshold.
The boolean answer — everything structurally upstream — is
:meth:structural_slice; this one keeps only what lies on a path
carrying at least threshold of the influence, in the
relative-sensitivity sense described in the module docstring.
0.01 reads as "1%" only when tau is comparable to the time
constants on the paths involved — the threshold is absolute, and a
path across k integrators carries a factor of tau**k, so the
same cutoff means different things at different tau. When the
strongest contributor scores 95, threshold=0.01 retains everything
down to ~0.01% of it, not 1%. Use :meth:relative_threshold to get
the cutoff that means a fraction of the dominant contributor.
Two kinds of node are kept, and the distinction is load-bearing. A node
is influential when its own best path to target clears the
threshold. It is a connector when it merely lies on some influential
node's best route: a relative weight is an elasticity, so a signal can
pass through a junction that nearly cancels it and be amplified back
afterwards, leaving a mid-route node with a small score of its own.
Keeping only the influential ones would punch holes in the result —
naming a block as influential while the route from it to the target ran
through blocks that had been dropped, leaving
:attr:InfluenceSlice.subgraph disconnected and :meth:bottlenecks
meaningless. Connectors are read off the routes the search actually
found, so nothing is added that no real path uses.
scores reports every retained node's own best product to the target,
which is the number to rank by.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
Node id, port object, or name fragment (see :meth: |
required | |
threshold
|
float
|
Minimum |
0.01
|
direction
|
str
|
|
'backward'
|
max_depth
|
int
|
Hard bound on path length, and the only hard bound — a
partial product is not a bound on the whole path's (see
:meth: |
32
|
Returns:
| Name | Type | Description |
|---|---|---|
An |
InfluenceSlice
|
class: |
Source code in jaxonomy/analysis/influence.py
755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 | |
structural_slice(target, *, direction='backward')
Boolean slice: every block structurally connected to target.
The over-approximation :meth:slice improves on, computed from the
model's declared connectivity rather than from the weighted graph — so
it stays a genuine bound even where a Jacobian could not be taken.
Provided so the two can be compared directly on a real model.
Source code in jaxonomy/analysis/influence.py
918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 | |
summary()
Human-readable overview: size, conventions, and honesty labels.
Source code in jaxonomy/analysis/influence.py
1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 | |
InfluenceSlice
dataclass
A quantitative model slice: what actually reaches a target.
Attributes:
| Name | Type | Description |
|---|---|---|
target |
str
|
Node id the slice was taken to (or from). |
threshold |
float
|
Influence cutoff a path had to clear to be included. |
direction |
str
|
|
scores |
Dict[str, float]
|
|
edges |
List[Tuple[str, str]]
|
|
blocks |
List[str]
|
Block name paths touched — the block-level slice. |
unknown_nodes |
List[str]
|
Nodes that some retained path reaches across an edge with no local gradient. Their score accounts only for the measurable routes, so it is not the whole story — treat it as a partial reading rather than a measurement. |
truncated |
bool
|
True if the path search hit its expansion budget, in which case the scores are lower bounds and the slice may be missing contributors. |
graph |
'InfluenceGraph'
|
The originating :class: |
Source code in jaxonomy/analysis/influence.py
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | |
block_scores
property
{block name path: score}, ranked, for the block-level answer.
:attr:scores is keyed by signal (one node per input port, output
port, and state group), which is the right granularity for tracing a
route but the wrong one for "which block matters most". This reduces a
block's nodes to one number by taking the maximum, so a block's
score is that of its most influential signal.
Max is the reducer because a block's input and output nodes lie on the
same path — summing them would count one route twice, and a block's
influence is not the sum of its ports' influences. The trade-off is
that a block reached by several genuinely independent routes reads as
its strongest one, not their total; use :meth:attribute when the
split between routes is the question.
The dict is ordered by descending score. Blocks holding a node in
:attr:unknown_nodes are present with a score covering only their
measurable routes — check that list before reading a rank as complete.
subgraph
property
The retained portion of the influence graph.
Built from the retained nodes and edges rather than as an edge-induced view, so a node with no retained edge — the target of a slice that keeps nothing else — is still present.
unknown_paths
property
True if any retained path crosses an edge with no local gradient.
report(by='node')
Human-readable ranking.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
by
|
str
|
|
'node'
|
Source code in jaxonomy/analysis/influence.py
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | |
LeafJacobians
dataclass
Local Jacobian blocks for one leaf at one operating point.
Attributes:
| Name | Type | Description |
|---|---|---|
leaf |
Any
|
The |
u0 |
List[Any]
|
Operating-point value of each input port, in port order. |
y0 |
List[Any]
|
Operating-point value of each output port, in port order. |
x0 |
Dict[str, Any]
|
Operating-point value of each state kind present, keyed by
|
d |
Dict[Tuple[int, int], ndarray]
|
|
c |
Dict[Tuple[str, int], ndarray]
|
|
b |
Dict[Tuple[str, int], ndarray]
|
|
a |
Dict[Tuple[str, str], ndarray]
|
|
notes |
Dict[str, str]
|
|
Source code in jaxonomy/analysis/block_jacobians.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
PathAttribution
dataclass
Chain-rule decomposition of one source's influence on one target.
Attributes:
| Name | Type | Description |
|---|---|---|
target |
str
|
Destination node id. |
source |
str
|
Origin node id. |
paths |
List[Dict[str, Any]]
|
One entry per path, ranked by |
total |
Optional[float]
|
Signed sum of path products when every path is signed, else
|
total_magnitude |
float
|
Sum of |
truncated |
bool
|
True if enumeration hit |
Source code in jaxonomy/analysis/influence.py
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 | |
format_influence_subgraph(graph, focus, edges, types=None, rates=None, dropped_for_budget=0)
Render a node/edge selection as compact, citable text.
The footer distinguishes the two reasons a block can be absent, because to a reader they mean opposite things. A block left out because its influence fell below the threshold is known to be negligible — that is an answer. A block left out because the budget ran out is simply unknown, and treating it as negligible would be a fabrication. Without the footer both look identical: missing.
Source code in jaxonomy/analysis/influence_context.py
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | |
influence_graph(system, context=None, *, at='operating_point', results=None, times=None, n_snapshots=5, tau=1.0, normalize='relative', scale_floor=1e-06, probe=None, reduce='max', simulator_options=None)
Build the sensitivity-weighted influence graph of a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system
|
A |
required | |
context
|
Root context fixing the operating point. Defaults to
|
None
|
|
at
|
str
|
|
'operating_point'
|
results
|
A |
None
|
|
times
|
Optional[Sequence[float]]
|
Explicit snapshot times, used instead of |
None
|
n_snapshots
|
int
|
How many times to take from |
5
|
tau
|
float
|
Seconds of integration represented by a continuous-state-rate
edge; only affects edges into |
1.0
|
normalize
|
str
|
|
'relative'
|
scale_floor
|
float
|
Floor on a signal's operating-point magnitude when
normalizing, so a signal that happens to sit at zero does not
produce an infinite elasticity. Nodes at the floor are visible via
their |
1e-06
|
probe
|
Optional[float]
|
When set to a relative step size ( |
None
|
reduce
|
str
|
How a trajectory profile collapses to the scalar weight used by
queries: |
'max'
|
simulator_options
|
|
None
|
Returns:
| Name | Type | Description |
|---|---|---|
An |
InfluenceGraph
|
class: |
Example
import jaxonomy from jaxonomy.library import Constant, Gain, Integrator from jaxonomy.analysis import influence_graph builder = jaxonomy.DiagramBuilder() source = builder.add(Constant(1.0, name="src")) gain = builder.add(Gain(3.0, name="gain")) plant = builder.add(Integrator(1.0, name="plant")) builder.connect(source.output_ports[0], gain.input_ports[0]) builder.connect(gain.output_ports[0], plant.input_ports[0]) diagram = builder.build(name="root") graph = influence_graph(diagram) graph.slice("plant:xc", threshold=0.01).blocks ['gain', 'plant', 'src']
Source code in jaxonomy/analysis/influence.py
1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 | |
influence_subgraph(graph, focus, *, budget_tokens=1500, hops=4, threshold=0.0, direction='both')
A bounded, budgeted, citable neighbourhood of focus.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
graph
|
InfluenceGraph
|
An :class: |
required |
focus
|
One or more focus points — node ids, port objects, name fragments, or a block name (which expands to all of that block's signals). |
required | |
budget_tokens
|
int
|
Approximate ceiling on the rendered text, at
:data: |
1500
|
hops
|
int
|
How many graph edges out from the focus to expand. Nodes are signals, so crossing one block costs two hops (wire in, block Jacobian out) — the default of 4 reaches roughly two blocks. |
4
|
threshold
|
float
|
Minimum edge |
0.0
|
direction
|
str
|
|
'both'
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with |
Dict[str, Any]
|
|
Dict[str, Any]
|
|
Source code in jaxonomy/analysis/influence_context.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | |
leaf_jacobians(leaf, root_context)
Compute every local Jacobian block of leaf at root_context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
leaf
|
A |
required | |
root_context
|
Root context supplying the operating point — time, parameters, this leaf's state, and (via upstream evaluation) the values arriving on its input ports. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
LeafJacobians
|
class: |
LeafJacobians
|
absent from |
|
LeafJacobians
|
this function does not raise on a non-differentiable block. |
Source code in jaxonomy/analysis/block_jacobians.py
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | |