The lab provides space to work with data and to reflect on how the concepts and techniques introduced in each lab might apply to your own research.

To earn a badge for each lab, you are required to respond to a set of prompts for two parts:

Part I: Extending our model

In this part of the badge activity, please add another variable – a variable for the number of days before the start of the module students registered. This variable will be a third predictor. By adding it, you’ll be able to examine how much more accurate your model is (if at al, as this variable might not have great predictive power). Note that this variable is a number and so no pre-processing is necessary.

In doing so, please move all of your code needed to run the analysis over from your case study file here. This is essential for your analysis to be reproducible. You may wish to break your code into multiple chunks based on the overall purpose of the code in the chunk (e.g., loading packages and data, wrangling data, and each of the machine learning steps).

```{setwd(“/Users/nickponzi/lab-1/data”)

library(tidyverse) library(tidymodels)

f <- list.files(pattern = “courses|assessments|studentInfo|studentRegistration|oulad-interactions|students|vle”, full.names = TRUE) f

l <- map(f, read_csv)

l[[2]] # courses l[[3]] # student assessment l[[4]] # student info l[[5]] # student registration l[[6]] # student interactions

how many students?

l[[5]] %>% count(id_student) l[[5]] %>% count(id_student, code_module, code_presentation)

how many courses

l[[2]] %>% count(code_module, code_presentation)

how many assessments

l[[2]] %>% count(id_assessment) # some assessments apparently not taken l[[2]] %>% count(id_assessment)

how many interactions

l[[5]] %>% count(id_site) l[[5]] %>% count(id_site)

—

student assessment (3), info (4), registration (5), assessments (1), and courses (2)

l[[2]] %>% count(id_assessment)

students <- l[[4]] %>% # student info left_join(l[[2]]) %>% # courses left_join(l[[5]])

assessments <- l[[6]] %>% left_join(l[[1]])

student VLE (6), VLE (7), and courses (2)

interactions <- l[[6]] %>% left_join(l[[7]]) %>% left_join(l[[2]])

students %>% write_csv(“students.csv”) interactions %>% write_csv(“oulad-interactions.csv”) assessments %>% write_csv(“students-assessments.csv”)

—

students_ss <- students %>% select(gender, highest_education, num_of_prev_attempts, disability, final_result, age_band, studied_credits)

students %>% View()

assessments %>% count(assessment_type)

l[[1]] %>% count(code_module, code_presentation, assessment_type) %>% View()

assessments %>% filter(assessment_type == “Exam”)

interactions %>% group_by(assessment_type) %>% summarize(mean = mean(sum_click), n = n()) %>% arrange(desc(mean))

#Extending the model students <- students%>% mutate(days_before_start = as.numeric(date - date_registration)) # Fit previous model previous_model <- glm(final_result ~ gender + highest_education + num_of_prev_attempts + disability + age_band + studied_credits, data = students, family)

Fit new model with days_before_start added

new_model <- glm(final_result ~ gender + highest_education + num_of_prev_attempts + disability + age_band + studied_credits + days_before_start, data = students, family = binomial)

Assess accuracy of the models

previous_model_accuracy <- predict(previous_model, type = “response”) new_model_accuracy <- predict(new_model, type = “response”)

Compare accuracy

summary(previous_model_accuracy) summary(new_model_accuracy) }

Previous results: The initial results show that there is a correlation between our model and prediciton.

New results: The new results also show that there is a high corrrelation betweeen our model and prediction.

How does the accuracy of this new model compare? Add a few reflections below: While the new model shows that there is high accuracy, it is not significantly improved from our last model. This might mean that the new variable we added did not play a large factor.

Part II: Reflect and Plan

Part A: Please refer back to Breiman’s (2001) article for these three questions.

  1. Can you summarize the primary difference between the two cultures of statistical modeling that Breiman outlines in his paper?
  • Data modeling culture is more concerned about fitting explicit data models to data based on assumed stochastic processes, however algorithmic modeling culture focuses on finding the predictive algorithms without making any assumptions about the data-generating process.
  1. How has the advent of big data and machine learning affected or reinforced Breiman’s argument since the article was published?
  • Since this article was first published there has been an overwhelming increase in the amount of data available to statisticians and there have been huge developments in machine learning. Both are now used in almost every single business worldwide and they have been extremely effective in their ability to make predictions for companys. Whether it is sales or baseball statistics these models have been extremely beneficial. I believe it reinforces the arguement that Breiman makes about the efficacy and widespread uses of Machine Learning.
  1. Breiman emphasized the importance of predictive accuracy over understanding why a method works. To what extent do you agree or disagree with this stance?
  • I would have to cautiously agree with Breimans approach. I do believe that first and foremost it is important to make sure that if you are going to use a model it must be accurate. You cant even begin to think about using the model if the model is not accurate since it would essentially be useless. However, I do believe it valuable to know why this model is accurate. If you do not understand why the model is accurate then you cannot make any changes to your business to understand what might make the output better.

Part B:

  1. How good was the machine learning model you developed in the badge activity? What if you read about someone using such a model as a reviewer of research? Please add your thoughts and reflections following the bullet point below.
  • The machine learning model we developed was a decent model. It is relatively simple in its scope so it may not be the most effective and complex model to use but it was not bad. I think such models could be useful for reviewing research especially when handling large data sets, but I would be cautious to blindly follow a machine learning model. Rather it would be better to use as supplemental information.
  1. How might the model be improved? Share any ideas you have at this time below:
  • Im not exactly sure on how we would improve the model that we built in the badge activity. I would say the most likely way we could improve the model is to either fine tune the variables that are most significant or develop a more complex model that is beyond my scope currently.

Part C: Use the institutional library (e.g. NU Library), Google Scholar or search engine to locate a research article, presentation, or resource that applies machine learning to an educational context aligned with your research interests. More specifically, locate a machine learning study that involves making predictions.

  1. Provide an APA citation for your selected study.

    • Kučak, D., Juričić, V., & Đambić, G. (2018). MACHINE LEARNING IN EDUCATION-A SURVEY OF CURRENT RESEARCH TRENDS. Annals of DAAAM & Proceedings, 29.
  2. What research questions were the authors of this study trying to address and why did they consider these questions important?

    • Some of the questions the authors were trying to address were: Predicting Student performance by learning about each student, Testing Students and Grading Students fairly by creating adaptive assessments, Improve Student Retention by identifying “at risk” students, Support teachers and staff by using classification of handwritten student papers.
  3. What were the results of these analyses?

    • Machine learning helped with grading by removing the human biases. There was no preexisting bias of each student and their performance so this was taken out of the equation while grading. Machine learning helped institutions be able to identify reasons why students may not be retained. The most succcessful aspect of machine learning was being able to predict the performance of student. By looking at time engaged and performance on previous assessments machine learning is able to predict students performance and apply additional help to those who are falling behind. This also helps the teachers as now the teachers know exactly what it is a student needs help improving on and how they could potentially approach doing this for the student.

Knit and Publish

Complete the following steps to knit and publish your work:

  1. First, change the name of the author: in the YAML header at the very top of this document to your name. The YAML header controls the style and feel for knitted document but doesn’t actually display in the final output.

  2. Next, click the knit button in the toolbar above to “knit” your R Markdown document to a HTML file that will be saved in your R Project folder. You should see a formatted webpage appear in your Viewer tab in the lower right pan or in a new browser window. Let your instructor know if you run into any issues with knitting.

  3. Finally, publish your webpage on Rpubs by clicking the “Publish” button located in the Viewer Pane after you knit your document.

Your First Machine Learning Badge

Congratulations, you’ve completed your first badge activity! To receive credit for this assignment and earn your first official Lab Badge, submit the link on Blackboard and share with your instructor.

Once your instructor has checked your link, you will be provided a physical version of the badge below!