How to predict based on multiple samples? I am relatively new to ML so I apologies in advance if my question shows lack of understating of the field.

The problem

A particular study course has a high drop-out rate and we want to reduce it.

The dataset

We have two data sets:


Data about the student themselves (e.g. scored of initial aptitude tests, demographic). This dataset includes the feature to predict. E.g.


ID, AGE, RESULT_TEST1, RESULT_TEST2,DROPPED_OUT
AAAA, 21, 0.6, 0.4, TRUE
BBBB, 20, 0.3, 0.9, FALSE



Exams taken by the students during the course. This dataset contains data about the type of the exam (e.g. subject, level of complexity) and the results obtained by the student. Some of the exams are required, some are mandatory and some can be taken on voluntary bases. That is, each student can take an arbitrary list of exams. E.g.


ID, EXAM_ID, EXAM_COMPLEXITY, EXAM_SCORE
AAAA, XXXXX, 0.8, 0.4
BBBB, YYYYY, 0.2, 0.8


The goal

The idea is to use ML to calculate the likelihood of a particular student to drop-out during the course using historical data. The system should be able to predict based on the two datasets, how likely is a student to at drop-out so that we can give him/her more support. 

The challenge

How do I combine the two datasets to train a model? I could create a superset joining the two but what would I then use to predict a result?

E.g. If I train the model on:

ID, AGE, RESULT_TEST1, RESULT_TEST2, EXAM_ID, EXAM_COMPLEXITY, EXAM_SCORE
AAAA, 21, 0.6, 0.4,XXXXX, 0.8, 0.4
BBBB, 20, 0.3, 0.9,YYYYY, 0.2, 0.8


How do I predict the likelihood of DROPPED_OUT passing all the data I have for a new student (multiple samples)?

Any explanation or pointers to documentation would be greatly appreciated.

Thank you in advance.

Alex
This is a reasonably standard problem for supervised ML:


The class is the variable "dropped_out"
Given the goal to predict a variable which is specific to a particular student, an instance must represent a student, not an exam.


This definition of what an instance should consist of seems to be the part that you didn't reach yet: you correctly saw that you need to join the two datasets but in your example you join them by exam id. As a result you obtain "instances" which each represent a particular exam by a particular student, and of course the same student might appear several times in the data. The solution is to join your datasets by student id in order to make a single instance contain all the information for one student, i.e. something like this:

AGE, RESULT_TEST1, RESULT_TEST2, SCORE_EXAM1, SCORE_EXAM2, SCORE_EXAM3,...., DROPPED_OUT


However it seems that the exams are not normalized, so I see two options:


Simplification: for each student, give only some summary statistics about their performance at exams, for example min, max, avg, std dev for both the score and the complexity. This gives a fixed number of features (8 in my example), each with a specific role so that the ML method can "make sense" of it.
Refactor the data: if possible, rearrange the exam data so that a column corresponds to the same exam for different students. This would mean that the exam complexity is not needed anymore, because the distribution of the grades is the only thing which matters. It's ok to have some missing/undefined values for the students who didn't take a particular exam, most ML methods can deal with that. 


The second option is very likely to give better results than the first, but it might be impractical to transform the data this way.