find_predictive_features: Find the top predictive features and values for each latent...

Description Usage Arguments Value See Also Examples

View source: R/predict.R

Description

Find the top predictive features and values for each latent class

Usage

1
find_predictive_features(mixdir_obj, top_n = 10)

Arguments

mixdir_obj

the result from a call to mixdir(). It needs to have the fields lambda and category_prob. lambda a vector of probabilities for each category. category_prob a list of a list of a named vector with probabilities for each feature, latent class and possible category.

top_n

the number of top answers per category that will be returned. Default: 10.

Value

A data frame with four columns: column, answer, class and probability. The probability column contains the chance that an observation belongs to the latent class if all that is known about that observation that `column`=`category`

See Also

find_typical_features find_defining_features

Examples

1
2
3
  data("mushroom")
  res <- mixdir(mushroom[1:30, ], beta=1)
  find_predictive_features(res, top_n=3)

mixdir documentation built on Sept. 20, 2019, 5:04 p.m.