multiple data lines for each person in my set
<p>So basically, I have a data set that looks similar to this:</p>

<p><strong>Person|Class|Score</strong></p>

<p>David, Comp sci, A<br>
David, English, B<br>
David, Chemistry, A<br>
Laura, Chemistry, A<br>
Henry, English, D<br>
Henry, French, A<br>
Henry, Art, B<br>
Clara, Comp Sci, B<br>
Clara, English, A</p>

<p>So the idea here is that I put in my own set, for example,<br>
Me:<br>
  Chemistry, B<br>
    English, A<br>
Comp Sci, B</p>

<p>If you look at the data set, you will see that my classes are most similar to David. I want my program to sort the names from most to least similar. Except in this case, David is NOT the most similar. It will actually be Clara. Here is the idea: Clara has two classes that are exactly the same as my classes. David has all the same classes, but his grades are only slightly off to mine. So, I won't worry about the math of getting to that, since the idea of whether a person's grade is more relevant or the number of classes is. </p>

<p>So here is my question: how would I organize something like this in python for machine learning? I would know what to do if there was one name for each line, but in this case a person can take multiple classes. These multiple occurrences are <strong>not</strong> independent events. The thing I have in mind is that I want the program to give weight to given students based on their similarity to me. For example, I could say that "Because Clara has more similarity to me, when I order a pizza, her telling me she wants pepperoni is more likely to have me order pepperoni than anything that Henry suggests, since Henry doesn't have similar taste to me in anything. However, if she likes pepperoni but I absolutely hate pepperoni (or everyone else hates pepperoni), then I will completely ignore her request.". So, I am adding a weighted "score" per se based on their similarity. </p>

<p>I have two additional questions: How would I deal with a set of keywords for people? for example, for things learned in each class, I could say "David, comp sci, A, (time complexity, binary trees, if statements)". I would want to use this to find which class best matches these keywords. So, if I ask what has binary trees and time complexity, the program would spit out computer science based on everyone's keywords for it.<br>
The other question is, what algorithm would work best? It seems to me that decision trees would work best in my case, but I am not sure.</p>