Skip to content
Snippets Groups Projects
Commit 0f5944a7 authored by Lukas Gehrke's avatar Lukas Gehrke
Browse files

Merge branch '50-prepare-presentation-slides' of...

Merge branch '50-prepare-presentation-slides' of git.informatik.uni-leipzig.de:text-mining-chatbot/wiki-rasa into 50-prepare-presentation-slides
parents 109ead0f dbd953ac
No related branches found
No related tags found
2 merge requests!71Documentation: Final Report,!59Resolve "Prepare presentation slides"
library(ggplot2)
# This assumes that the master script ran through and the result data frame is available
feature_count <- sapply(results, function(col) sum(length(which(!is.na(col)))))
feature_count <- data.frame(Count <- feature_count,
Feature <- colnames(results),
stringsAsFactors = FALSE)
feature_count <- feature_count[feature_count$Count > 0 & feature_count$Feature != "name",]
colnames(feature_count) <- c("Count", "Feature")
# Flipped coord barplot
p <- ggplot(feature_count, aes(x = reorder(Feature, Count), y = Count, fill = Feature))
p <- p + geom_bar(stat = "identity", width = 0.5)
p <- p + geom_hline(aes(yintercept = 983), colour = "red")
p <- p + coord_flip()
p <- p + guides(fill = FALSE)
p <- p + theme_minimal()
p <- p + labs(x = "Feature")
p
ggsave("feature_count_flip.png", path = "plots", width = 4, height = 4, units = "in")
# Normal barplot
p <- ggplot(feature_count, aes(x = reorder(Feature, -Count), y = Count, fill = Feature))
p <- p + geom_bar(stat = "identity", width = 0.5)
p <- p + geom_hline(aes(yintercept = 983), colour = "red")
p <- p + theme_minimal()
p <- p + theme(axis.text.x=element_blank())
p <- p + labs(x = "Feature")
p
ggsave("feature_count_normal.png", path = "plots", width = 4, height = 4, units = "in")
docs/abschluss_presentation/plots/feature_count_flip.png

21.1 KiB

docs/abschluss_presentation/plots/feature_count_normal.png

21.1 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment