plot_features {mixdir}R Documentation

Plot cluster distribution for a subset of features features

Description

Plot cluster distribution for a subset of features features

Usage

plot_features(features, category_prob,
  classes = seq_len(length(category_prob[[1]])))

Arguments

features

a character vector with feature names

category_prob

a list over all features containing a list of the probability of each answer for every class. It is usually obtained from the result of a call to mixdir().

classes

numerical vector specifying which latent classes are plotted. By default all.

Examples

  
    data("mushroom")
    res <- mixdir(mushroom[1:100, ], n_latent=4)
    plot_features(c("bruises", "edible"), res$category_prob)

    res2 <- mixdir(mushroom[1:100, ], n_latent=20)
    def_feats <- find_defining_features(res2, mushroom[1:100, ], n_features=Inf)
    plot_features(def_feats$features[1:6], category_prob = res2$category_prob,
                  classes=which(res$lambda > 0.01))
   

[Package mixdir version 0.3.0 Index]