GradientResult#
- class hybrid_aif.planning.GradientResult[source]#
Bases:
NamedTupleOne gradient plan. With several starts,
planis the best start’s andtrace,gradient_traceandbest_stepare its own.- q_pi: Categorical#
The point mass on
pick,(starts,).
- tree: dict[str, dict[str, Interval]] | None#
The term tree of
plan(the picked start’s slice ofstart_tree).
- plan: Array#
The best plan scored over the descent (the warm start and the final plan included),
(policy_len, action_dim): the best start’s.
- start_G: Interval#
The expected free energy over
start_plans(a policy axis ofstartsentries),(starts,).
- start_tree: dict[str, dict[str, Interval]] | None#
The term tree over
start_plans(Noneundermetrics=False).
- posterior: TruncatedGaussian | None#
The restriction of
curvatureto the box (Noneunderposterior="mode").
- curvature: Gaussian | None#
The Laplace Gaussian
N(plan, (γ∇²G)⁻¹)over the flattened plan, taken atplan(Noneunderposterior="mode").
- gradient_trace: Array#
The root mean square of the gradient over all plan coordinates before each step,
(steps,).
- best_step: Array#
The int32 index of the plan returned:
tfor the plan held before stept(0is the warm start) andstepsfor the final plan.
- start_scores: Array#
Each start’s final score (the descended point of
G),(starts,);(1,)for one start.
- static __new__(
- _cls,
- q_pi,
- tree,
- plan,
- G,
- start_plans,
- pick,
- start_G,
- start_tree,
- posterior,
- curvature,
- trace,
- gradient_trace,
- best_step,
- start_scores,
Create new instance of GradientResult(q_pi, tree, plan, G, start_plans, pick, start_G, start_tree, posterior, curvature, trace, gradient_trace, best_step, start_scores)