From 51a0024f5df7421332b1367a5842d2b6989ac34f Mon Sep 17 00:00:00 2001 From: Vidushi Gupta <55969597+Vidushi-Gupta@users.noreply.github.com> Date: Mon, 3 Jul 2023 17:47:44 +0530 Subject: [PATCH] Removed violin plot --- 2-Regression/4-Logistic/solution/R/lesson_4.Rmd | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/2-Regression/4-Logistic/solution/R/lesson_4.Rmd b/2-Regression/4-Logistic/solution/R/lesson_4.Rmd index 29b4b813..ab82d3e9 100644 --- a/2-Regression/4-Logistic/solution/R/lesson_4.Rmd +++ b/2-Regression/4-Logistic/solution/R/lesson_4.Rmd @@ -220,22 +220,6 @@ baked_pumpkins %>% theme(legend.position = "none") ``` -#### **Violin plot** - -A 'violin' type plot is useful as you can easily visualize the way that data in the two categories is distributed. [`Violin plots`](https://en.wikipedia.org/wiki/Violin_plot) are similar to box plots, except that they also show the probability density of the data at different values. Violin plots don't work so well with smaller datasets as the distribution is displayed more 'smoothly'. - -```{r violin_plot} -# Create a violin plot of color and item_size -baked_pumpkins %>% - mutate(color = factor(color)) %>% - ggplot(mapping = aes(x = color, y = item_size, fill = color)) + - geom_violin() + - geom_boxplot(color = "black", fill = "white", width = 0.02) + - scale_fill_brewer(palette = "Dark2", direction = -1) + - theme(legend.position = "none") - -``` - Now that we have an idea of the relationship between the binary categories of color and the larger group of sizes, let's explore logistic regression to determine a given pumpkin's likely color. ## 3. Build your model