Assemble anchor targets from prototype sets
Source:R/dkge-anchor-targets.R
dkge_anchor_targets_from_prototypes.RdConvenience helper that stacks calls to [dkge_anchor_contrast_from_prototypes()] so the resulting matrix can be fed directly to [dkge_classify()] as a weight specification.
Usage
dkge_anchor_targets_from_prototypes(
anchors,
prototypes,
negatives = NULL,
sigma = NULL,
normalize = TRUE
)Arguments
- anchors
Matrix of anchor coordinates (`L x d`).
- prototypes
Named list whose elements are matrices (rows = prototypes in the same feature space as `anchors`). List names become class labels.
- negatives
Optional named list of matrices providing negative prototypes per class (matched by name). When `NULL`, classes are contrasted against the origin.
- sigma
Optional bandwidth passed to [dkge_anchor_contrast_from_prototypes()]. Defaults to the per-class median heuristic.
- normalize
Logical indicator forwarded to [dkge_anchor_contrast_from_prototypes()].