Skip to contents

Given a fitted parsnip model or workflow (for example a LASSO glmnet logistic regression), returns the rows of concepts whose predictor has a non-zero coefficient. Use it to keep the in-database scoring table narrow: pass the result to materialize_concept_features().

Usage

model_concepts(fit, concepts)

Arguments

fit

A fitted parsnip model, or a fitted workflow.

concepts

The concepts data.frame of an extract_sparse_concept_matrix() result (or the result itself).

Value

The subset of concepts used by the model, with a feature column.