Automatically produce regularization matrices for simlr

regularizeSimlr(x, knn, fraction = 0.1, sigma, kPackage = "FNN")

Arguments

x

A list that contains the named matrices. Note: the optimization will likely perform much more smoothly if the input matrices are each scaled to zero mean unit variance e.g. by the scale function. Note: x may also contain a mixture of raw matrix data and masks which are binary antsImages. If a mask is passed, this function will assume the user wants spatial regularization for that entry.

knn

A vector of knn values (integers, same length as matrices)

fraction

optional single scalar value to determine knn

sigma

optional sigma vector for regularization (same length as matrices)

kPackage

name of package to use for knn. FNN is reproducbile but RcppHNSW is much faster (with nthreads controlled by enviornment variable ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS) for larger problems. For large problems, compute the regularization once and save to disk; load for repeatability.

Value

A list of regularization matrices.

Author

BB Avants.

Examples

# see simlr examples