name: op-attr-profile-similarity
description: Per-row similarity to a target profile — correlation, cosine or a set similarity across a vector's members, against a literal, label-map or registered reference.
kind: operator
category: ATTR
operator: ATTR_PROFILE_SIMILARITY
type: reference
applies_to: process, compose, predict
examples_tags: [feature-engineering, multivariate, streaming-friendly]
Use when
Adds to every row how closely its related fields match a target profile: an ideal pattern, a benchmark, or its own segment target.
Questions it answers:
- How closely does each respondent’s brand ratings follow the ideal loyalist profile?
- How similar is each store’s channel mix to its region’s target mix?
Use something else:
ATTR_VEC_DISTANCEwhen you want how far apart the values are rather than how alike the pattern is.
Params
metric— similarity only:correlation,cosine,jaccard,dice,overlap. Default from the vector’skind(scale →correlation); none →PULSE_VECTOR_METRIC_REQUIRED. A distance →PULSE_VECTOR_METRIC_UNKNOWN,details.use=ATTR_VEC_DISTANCE.reference(required) —[…](member order),{label: value},{table, key}or{table, key_field}(categorical oru4…u64, by base-10 form).min_valid— fewest complete pairs, default 1; below → null.labels— inlinefieldsonly.
Slot: exactly one of vector (a vectors entry) / fields; no field.
Inputs
Members: u4…u64, f32/f64; source columns only.
Output
One f64 per record; null below min_valid or with no profile.
Components
Floor {n, n_null} + n_reference_missing, n_domain_invalid. Mergeable.
Gotchas
- Matched BY LABEL, never position: wrong labels / length →
PULSE_VECTOR_REFERENCE_MISMATCHat predict. - A null or profile-less
key_fieldrow is null and warnsPULSE_VECTOR_REFERENCE_MISSING(n_key_null,n_key_unmatched); a domain violationPULSE_VECTOR_METRIC_DOMAIN. Once per slot; strict does not escalate. - Row-local: streams, fuses; weight ignored.
See
pulse_examples_search tags=[feature-engineering, multivariate]- Skills:
vector-metrics,multivariate-design