find_predictive_features {mixdir}R Documentation

Find the top predictive features and values for each latent class

Description

Find the top predictive features and values for each latent class

Usage

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

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


[Package mixdir version 0.3.0 Index]