Extract frozen writing features for warm-start prediction
Source:R/warm_start_features.R
extract_warm_start_features.RdWarm-start prediction uses text features to predict relative writing quality before collecting pairwise comparisons. This function extracts the frozen English writing features; it does not train a model or estimate BTL scores.
Arguments
- ids
Unique, nonmissing character or finite numeric item IDs. IDs are returned as character strings; blank IDs are not allowed.
- texts
A nonempty character vector of the same length as
ids, without missing values. Empty strings are allowed. Text is never trimmed or normalized.- schema
The frozen schema identifier, currently
"writing_features_v1".- python
Optional path to an existing Python interpreter. With
NULL, use an existing environment selected through reticulate. Automatic environment creation is disabled. Conflicting interpreter selections require correction or a fresh R session; this function never switches an initialized interpreter.
Value
A tibble with character item_id and the 20 numeric features in schema
order, in the requested ID order. The warm_start_schema attribute records
the schema identifier. Document-level undefined values remain NA.
Details
Extraction requires optional reticulate and the audited Python 3.12.3 stack.
See warm_start_python_status() and the installed setup instructions located by
system.file("python", "README.md", package = "pairwiseLLM").
Software and resources must be installed explicitly before extraction. Package
loading, schema inspection, and later prediction from precomputed features do
not require Python. The tested environment is Linux x86_64; Windows and macOS
have not been validated. Features are not evidence of predictive validity.
The default English spaCy model, resource contents and package versions are
checked before extraction. Missing resources fail without downloads. Entropy
is divided by all spaCy tokens, including punctuation and whitespace, rather
than the filtered n_tokens feature. Undefined values and valid zeros follow
warm_start_feature_schema(). Zero-vector coherence preserves upstream values
and warnings. No feature is imputed or replaced with zero.
See also
warm_start_python_status(), warm_start_feature_schema(), fit_warm_start_model()
Other adaptive warm start:
ensemble_warm_start_models(),
fit_warm_start_model(),
make_warm_start_cv_plan(),
make_warm_start_prior(),
pairwiseLLM_warm_model,
predict.pairwiseLLM_warm_ensemble(),
predict.pairwiseLLM_warm_model(),
prepare_warm_start_model(),
register_warm_start_model(),
save_warm_start_model(),
summary.pairwiseLLM_warm_ensemble(),
summary.pairwiseLLM_warm_predictions(),
warm_start_coefficients(),
warm_start_feature_schema(),
warm_start_python_status()