forked from Env-Data-Sci-FA23/Week-2-Debugging-AI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ashleephai_models.Rmd
66 lines (40 loc) · 2.23 KB
/
Ashleephai_models.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
title: "ai_model_assignment"
author: "Katie Willi and Caitlin Mothes"
date: "`r Sys.Date()`"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, eval = FALSE)
```
For this assignment, copy and paste both **your question to the chat bot** as well as **the chat bot's response** below each assignment question.
1) Ask an AI chat bot (like ChatGPT or Claude) what the following chunk of code does:
```{r}
library(palmerpenguins)
data("penguins")
step_one <- function(x){
x <- as.character(x)
}
species_list <- unlist(lapply(penguins$species, step_one))
adelie_indices <- which(species_list == "Adelie")
adelie_penguins <- penguins[adelie_indices, ]
```
**Question posed to chat bot:**
**Chat bot response:**
2) Ask the AI model to simplify the code in question 1.
**Question to chat bot:**
**Chat bot response:**
3. Is the AI model's response to Question 2 in the {tidyverse} style (e.g., does the response use any {tidyverse} functions, the `%>%` pipe, etc.)?
**Question to chat bot:**
**Chat bot response:**
4. If the AI model's response did not use the {tidyverse}, ask it to convert the code into {tidyverese} style. If your response already used the {tidyverse}, make a guess as to why it might have already done so. *\<--- just a thought experiment, don't worry too much about how you answer this!*
**Question to chat bot** (*if your previous question was not in tidyverse)*:
**Chat bot response:**
5. Does the code that ChatGPT put together for you work? If it doesn't, ask the chat bot to fix it. Does it work now?
6. Ask the chat bot if there is a significant difference in bill length across Adelie penguin sexes in the {palmerpenguins} data set (using R).
**Question posed to chat bot:**
**Chat bot response:**
7. Does the code produced work? (*Copy and paste the code in R Studio console to run it).* If not, what was wrong with it's answer?
8. Did the chat bot's response include an assessment of whether the Adelie penguins data met the assumptions of the statistical test used in the response? (e.g., test for normality or equal variances)? If not, pose the question again to test for the assumptions and paste the new question/response below.
**Question to chat bot:**
**Chat bot response:**