1
$\begingroup$

Let’s use a simple example. My training set contains 5000 schools. For each school, there is a matrix. Each row of the matrix is a student, each column of the matrix is the grade of a subject (math, chemistry, biology, and physics). Let’s assume each school has the same number of students (1000), so each matrix is 1000 by 4. I also know which of these 5000 schools are public, which of these 5000 schools are private. Are there any machine learning algorithm that can take matrix as input and build a predictive model (without feature engineering)?

$\endgroup$
3
$\begingroup$

If the datapoint is a matrix it is always possible to unroll the matrix to a vector. But in your case it dosn't make sense.

I think the best way for you is to use basic feature engineering to create a vector for each school. Features could be simple - average grade in math, chemistry, etc. You can use quantile, min, max, percentage of highest grade etc. The private/public would be another feature.

For this setting you don't event need to assume constant number of students in each school.

$\endgroup$
4
  • $\begingroup$ I second the idea of using summary statistics for each school. Presumably Dr Who wants a predictive model for schools not for students. Perhaps you could add to your answer that this approach is only valid if the study is focused on modeling schools $\endgroup$ – Hugh Jun 16 '17 at 7:06
  • 1
    $\begingroup$ Thanks Hough for a comment. I think it is clear from the question that predictions should be done for schools. "How do I setup machine learning when each data point is a matrix?", "For each school, there is a matrix" $\endgroup$ – Tomáš Přinda Jun 16 '17 at 7:31
  • $\begingroup$ Good point Tomáš $\endgroup$ – Hugh Jun 16 '17 at 7:44
  • $\begingroup$ Thanks for the answer. I am aware of how feature engineering can be applied to this example. However, feature engineering is time-consuming for more complicated examples. In addition, because feature engineering and model fitting are in 2 separate steps, the whole process can't be optimized globally. The purpose of my question is not to find a practical solution to this particular problem, but to see if people know any methods that take a matrix as input. $\endgroup$ – Dr. Who Jun 16 '17 at 13:53
2
$\begingroup$

I will suggest a way different from the one which was already given. You can append school information each to student and then model it. This way, each student entry has information about his marks and one column which tells you which school he is from. Instead of having 5000 matrices each with 1000 entries, you just have 5000000 entries as input now.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.