commit 6236d232c3dc3841d81426c9bcb8f09c1eb07601
parent 66a9a5706a992e5bf0e8e0579d56cdaf143f883d
Author: Jared Tobin <jared@jtobin.ca>
Date: Sun, 21 Feb 2016 17:07:04 +1300
Tweak CRP graphs.
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/chinese-restaurant-process/src/simulation_crp.r b/chinese-restaurant-process/src/simulation_crp.r
@@ -16,9 +16,15 @@ experiment = apply(
results = melt(experiment, id.vars = 'table')
by_concentration = group_by(results, table = table, settings = factor(L1))
-summarised = summarise(by_concentration, customers = mean(value))
log_log_plot =
+ ggplot(by_concentration, aes(table, value, fill = settings, colour = settings)) +
+ geom_jitter(width = 0.5, height = 0.45, alpha = 0.2) +
+ scale_x_log10() + scale_y_log10()
+
+summarised = summarise(by_concentration, customers = mean(value))
+
+mean_log_log_plot =
ggplot(summarised, aes(table, customers, fill = settings, colour = settings)) +
geom_point(alpha = 0.8) +
scale_x_log10() + scale_y_log10()