HessianResult

class HessianResult(hessian, eigenvalues, eigenvectors, center, program_type)[source]

Bases: object

Result of a Hessian computation at a parameter point.

Contains the symmetric Hessian matrix (hessian), eigenvalues sorted in ascending order (eigenvalues), corresponding eigenvectors as columns (eigenvectors), the evaluation point (center), and the program class name (program_type).

Attributes Summary

Methods Summary

bottom_eigenvectors([k])

Return the k eigenvectors with the smallest eigenvalues.

top_eigenvectors([k])

Return the k eigenvectors with the largest eigenvalues.

Attributes Documentation

center: ndarray[tuple[Any, ...], dtype[float64]]
eigenvalues: ndarray[tuple[Any, ...], dtype[float64]]
eigenvectors: ndarray[tuple[Any, ...], dtype[float64]]
hessian: ndarray[tuple[Any, ...], dtype[float64]]
program_type: str

Methods Documentation

bottom_eigenvectors(k=2)[source]

Return the k eigenvectors with the smallest eigenvalues.

These correspond to the flattest directions.

Return type:

list[ndarray[tuple[Any, ...], dtype[double]]]

top_eigenvectors(k=2)[source]

Return the k eigenvectors with the largest eigenvalues.

These correspond to the steepest curvature directions and are natural choices for divi.viz.scan_2d() direction_x / direction_y.

Return type:

list[ndarray[tuple[Any, ...], dtype[double]]]