2
$\begingroup$

I am writing a program which takes notes from a keyboard as the input, (just numbers, 1 to 88) and decides which notes are played by which hand. There are a lot of variables, for example, the position of the note(the higher it is the more chance it will be played by a right hand and vice versa), the amount of notes played by the same hand next to the target note, etc.

If I have some experimental data and analysed it, what is the way to fit an equation ( a curve) to it? The most I've done of the sort is fitting a line to a set of data, so I am a bit lost. Also, as I understand, if there are two (and there probably will be more) variables than the plot is 3-dimentional , so is there still a way to do it if I have a lot of variables. I am a bit of a noob in statistics so links with detailed description etc will be very much appreciated.

Thanks.

EDIT:

Ok, here is a little more information. For now let's take two variables, the height of the note and the number of notes played by the same hand near the given note (a radius of one bar). If the note is number 40 (Middle C) or higher it is more likely to be played by the right hand, and if the note is below 40 it is more likely to be played by the left one. I think a sigmoid function with a centre at 40 would describe it pretty well, with the shape being slightly different depending on the second variable. I have a score of around 1000 notes, each note has information about the hand it is played by, its height and the number of notes played by the same hand in the radius of 1 bar.

ANOTHER EDIT:

OK, here is a little more information about the nature of data I have and the purpose of all this:

The purpose of the program is not analytical, but practical. A player plays a MIDI keyboard and records a MIDI file. This is basically a file containing digital descriptions of every note he played - its height, time at which it was played, length, and velocity with which it was hit. I have no information which note was played by which hand. However, I can have a good guess using the information I do know about the notes. All I need is formula describing probability of each note being played by either a left hand or a right one.

The note is played by either left of right hand, so the output I am after is Left or Right, it is a bit like a coin flip problem, only this one depends on many variables rather than just 50/50.

Please let me know if you need any more information.

Thanks.

$\endgroup$
  • 2
    $\begingroup$ Because this is such a specific application, specific information beyond "a lot of variables" is needed. Although you don't have to explain them all, it is important to know what kinds of variables they are, how they are measured, what aspects of those measurements you have recorded, and how much data you have. Your edits to the question to clarify these points would be most welcome. $\endgroup$ – whuber Apr 18 '14 at 22:33
1
$\begingroup$

There's a huge variety of algorithms for making binary classifications. Knowing which one is best for you depends on knowing a little more about the kind of outputs you are after. For example would you like to know in each case the probability that the note is being played with, say, the left hand or do you just need a yes or no answer? Do you need to be able to understand the contribution of each of the variables to the probability that the note is being played with the left hand? Does the solution need to be implemented somewhere where it would be difficult to embed a complicated algorithm. In fact these are all questions that would be partially answered if you could tell us a little about the purpose of the experiment. It does sound like logistic regression would be a promising place to start.

Sorry stack exchange users. I know this is more of a comment but I'm new and I don't yet have enough points to comment!

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for your answer. The note is played by either left of right hand, so the output I am after is Left or Right, it is a bit like a coin flip problem, only this one depends on many variables rather than just 50/50. The purpose of the program is not analytical, but practical. Having a stream of notes I want to identify the hand each one is played by. The complicated algorithms are fine, I think. $\endgroup$ – redFur Apr 19 '14 at 10:10
  • $\begingroup$ logistic regression? seems like a good start, without understanding your problem at all $\endgroup$ – charles Apr 19 '14 at 13:43
  • 1
    $\begingroup$ In that case I would start, as suggested, with logistic regression. There's plenty of tutorials and guides online. This one looks good $\endgroup$ – Simon Raper Apr 22 '14 at 16:24

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.