These functions allow you to check whether the dimensions of the
label matrix and the kernel matrix (matrices) are compatible.
valid_dimensions
checks whether both k and g are square matrices,
whether y has as many rows as k and whether y has as many columns as g.
is_square
checks whether both dimensions are the same.
valid_dimensions(y, k, g = NULL)is_square(x)
a label matrix
a kernel matrix
an optional second kernel matrix or NULL
otherwise.
any matrix
a logical value indicating whether the dimensions of the matrices are compatible for a two step kernel ridge regression.