conatus.expert.gain

conatus.expert.gain(Phi, F, Z)[source]

G = max ‖F Φ x‖² / ‖F x‖² over x in range(Z) (SVD), and the optimal structures.

Z = op.admissible_basis(): initial states that satisfy continuity and the boundary conditions. Z=None maximizes over all free coefficients (the convention of some published codes); those inputs are not admissible, the first step projects them in a dt-dependent way and the gain then converges only at order ≈ 1 in dt (measured). The choice is explicit: there is no default.

Parameters:
  • Phi (ndarray)

  • F (ndarray)

  • Z (ndarray | None)

Return type:

GainResult