getCheckerboardKernel: Checkerboard kernel

View source: R/SSM.R

getCheckerboardKernelR Documentation

Checkerboard kernel

Description

Internal soundgen function.

Usage

getCheckerboardKernel(
  size,
  kernel_mean = 0,
  kernelSD = 0.5,
  plot = FALSE,
  checker = TRUE
)

Arguments

size

kernel size (points), preferably an even number

kernel_mean, kernelSD

mean and SD of the gaussian kernel

plot

if TRUE, shows a perspective plot of the kernel

checker

if TRUE, inverts two quadrants

Details

Prepares a square matrix size x size specifying a gaussian kernel for measuring novelty of self-similarity matrices. Called by getNovelty

Value

Returns a square matrix with size rows and columns.

Examples

kernel = soundgen:::getCheckerboardKernel(size = 64, kernelSD = 0.1, plot = TRUE)
dim(kernel)
kernel = soundgen:::getCheckerboardKernel(size = 19, kernelSD = .5,
  checker = FALSE, plot = TRUE)
kernel = soundgen:::getCheckerboardKernel(size = c(9, 45), kernelSD = .5,
  checker = FALSE, plot = TRUE)
kernel = soundgen:::getCheckerboardKernel(size = c(9, 45), kernelSD = .5,
  checker = TRUE, plot = TRUE)

soundgen documentation built on Sept. 29, 2023, 5:09 p.m.