- x
A list of images, where each image is a matrix (for grayscale) or a
3D array with dimensions (height, width, channels) for color images. Images
may have different dimensions, but must be large enough to accommodate the
convolution kernel size. Missing values are not allowed.
- p
The number of random convolutional kernels to generate.
- size
The size of the square convolutional kernel (e.g., 3 means a
3x3 kernel).
- stride
The stride for the convolution operation, i.e., how many
pixels to skip between kernel applications. Default is 1.
- kernel_gen
Method for generating convolutional kernels. Either "rnorm"
to generate kernels with entries drawn i.i.d. from a standard Normal
distribution, or "patch" to extract random patches from the input images.
- activation
A function to pool the convolution outputs for each kernel.
Defaults to max(). The function should accept a numeric vector and return
a scalar or vector of pooled values. Common choices include max(),
mean(), functions like the proportion of positive values (PPV), which
can be implemented with function(x) mean(x > 0). Multivariate pooling
functions are also supported.
- stdize
How to standardize the predictors, if at all. The default
"scale" applies scale() to the input so that the features have mean
zero and unit variance, "box" scales the data along each dimension
to lie in the unit hypercube, and "symbox" scales the data along each
dimension to lie in \([-0.5, 0.5]^d\).
- kernels
Optional matrix of pre-specified convolutional kernels, where
each column is a kernel in column-major format. If provided, overrides p,
size, and kernel_gen.
- shift
Vector of shifts, or single shift value, to use. If provided,
overrides those calculated according to stdize.
- scale
Vector of scales, or single scale value, to use. If provided,
overrides those calculated according to stdize.