imate.InterpolateLogdet.get_scale#
- InterpolateLogdet.get_scale()#
Returns the scale parameter of the interpolator.
This function can be called if
kind=crf
orkind=spl
.- Returns:
- scalefloat
Scale parameter of the interpolator.
- Raises:
- NotImplementedError
If
kind
is notcrf
.
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 byimate.InterpolateLogdet.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 InterpolateLogdet >>> ti = [1e-2, 1e-1, 1, 1e1] >>> f = InterpolateLogdet(A, kind='crf', ti=ti, scale=None) >>> f.get_scale() 0.8010742187499998