sfa_name: Name the Factors of an sfa Fit

View source: R/naming.R

sfa_nameR Documentation

Name the Factors of an sfa Fit

Description

Retrieves a verbal label for every factor of an sfa() fit by embedding the fit's items under a construct-retrieval instruction, building one naming target per factor, and ranking a large pre-filtered candidate pool. Deterministic: the same fit, model, and pool always produce the same labels.

Usage

sfa_name(
  fit,
  model = NULL,
  pool = NULL,
  n_candidates = 5L,
  instruction = NULL,
  collision = TRUE,
  loo_sets = TRUE,
  salient = NULL,
  block_size = 50000L,
  ...
)

Arguments

fit

An object of class sfa.

model

Embedding model used for naming. Default NULL reuses the model the fit was embedded with. Passing a different model (e.g. a larger one) switches naming to that model while keeping the fitted factor structure - extraction and naming reward different model properties, and a larger namer typically improves label abstraction.

pool

An sfa_pool object, or NULL to fetch/build the pool for model via sfa_pool().

n_candidates

Length of the gated candidate list per factor (default 5).

instruction

Override the naming instruction (see sfa_naming_instruction()); a warning notes that results were validated under the default.

collision

Resolve duplicate labels across factors via the geometric keeper (default TRUE).

loo_sets

Compute leave-one-out candidate sets (default TRUE).

salient

Loading threshold defining a factor's items for naming: items whose primary factor this is. Reserved for future use; the assignment rule is primary-loading, as in the research method.

block_size

Pool rows per block during retrieval (memory knob).

...

Passed to the embedding backend.

Value

An object of class sfa_labels: a data.frame with one row per factor (factor, label, rule, candidates, n_items, collision_moved) plus attributes gated, model, instruction.


semanticfa documentation built on Sept. 2, 2026, 1:07 a.m.