imate.InterpolateTrace.get_scale#

InterpolateTrace.get_scale()#

Returns the scale parameter of the interpolator.

This function can be called if kind=crf or kind=spl.

Returns:
scalefloat

Scale parameter of the interpolator.

Raises:
NotImplementedError

If kind is not crf.

Examples

In the following scale, since the input argument scale is set to None, it i automatically generated by optimization. Its value can be accessed by imate.InterpolateTrace.get_scale() function.

>>> # Generate two sample matrices (symmetric positive-definite)
>>> from imate.sample_matrices import correlation_matrix
>>> A = correlation_matrix(size=20, scale=1e-1)

>>> # Initialize interpolator object
>>> from imate import InterpolateTrace
>>> ti = [1e-2, 1e-1, 1, 1e1]
>>> f = InterpolateTrace(A, B, p=2, kind='crf', ti=ti, scale=None)

>>> f.get_scale()
1.4101562500000009