glearn.Covariance.get_scale#
- Covariance.get_scale()#
Returns the array of scale hyperparameters of the correlation matrix.
- Returns:
- scalefloat or array_like[float]
The scale hyperparameters \(\boldsymbol{\alpha} = (\alpha_1, \dots, \alpha_d)\).
Examples
Set scales \(\boldsymbol{\alpha} = [2, 3]\) for a two-dimensional data:
>>> # Generate a set of points >>> from glearn.sample_data import generate_points >>> x = generate_points(num_points=20, dimension=2) >>> # Create a covariance object >>> from glearn import Covariance >>> cov = Covariance(x) >>> cov.get_scale() None >>> # Change scale >>> cov.set_scale([2.0, 3.0]) >>> cov.get_scale() array([2., 3.])