Closed batchku closed 10 years ago
i must admit, that i don't know WHAT i did but the patch worked for a minute; now no mater what i do i get "unable to map input"
hmmmm
ok, i see that this is the same issue that we discussed here: https://github.com/cmuartfab/ml-lib/issues/58; i'm closing the other issue.
some questions/comments:
ali
Hi Ali,
That's correct, I think this a duplicate of #58.
The reason "record" is necessary when adding time series is in order to differentiate multiple exemplars of the same time series class from compound time series. For example you may want to provide multiple "circle" gestures at different sizes. Without the ability to mark the start and end of each training gesture, there would be no way to differentiate three progressively smaller circles given as exemplars for a circle class, from a spiral given as a single example for a spiral class. "record" enables us to say "record 1 ... here's our first circle ... record 0 ... record 1 ... here's our second circle ... etc".
The situation is similar when mapping. Without record, the accumulated input is treated as a single gesture. So if you gave input gestures of a circle followed by a square, the circle would get matched, but the square would only get matched if one of your training examples contained the gesture: circle followed by square. What you most likely want is for the square to be recognised as a separate gesture. So "record" has the same semantics in mapping as it does in adding, you're saying "record 1 ... here's one gesture ... record 0 ... record 1 ... here's another gesture ... etc".
Of course gesture classification is only one way to use DTW. The normal application is subsequence matching, where you record a (usually) long time series (could be a number of minutes), and then you provide continuous input in the mapping phase and it tells you where you are in the original time series. In this case there would only be one record 1/0 for the "add" stage and possibly only one for the map stage. I haven't implemented the feature yet but it is planned.
Does this make sense now, or are you still sceptical?
i'm not sceptical.
what about what you describe in your last sentence is not yet possible? can' you just send in a slice of your gesture with the "map" command and see what the object thinks it is?
for the moment, i am able to get results from ml.dtw by leaving "record" on; however, i find that it's not doing such a good job recognizing the difference between ascension and descension. please take a look at my new helpfil to see. am i doing something wrong?
OK...
I'll take a look at the help file shortly.
ok, this makes sense and your second bullet explains my issue. let's definitely change "record" to "listen". it's much apt, especially for the mapping mode.
a
On Thu, Mar 13, 2014 at 7:56 AM, Jamie Bullock notifications@github.comwrote:
OK...
-
If you train with a labelled time series (even just a single time series), and then "map" with a "partial" gesture that is contained with the time series, it should give you the class of the "partial gesture" matching that of the longer time series. What it won't do is tell you _where_in the longer time series the shorter one can be found. So if your stored time series is labelled 1 and contains a zig zag pattern with a circle in the middle, if you "map" a circle, it should give you a label of "1" but it won't be able to tell you "the circle is located at the nth sample of the original time series". This is yet to be implemented, and could be used for score following, for example.
Constantly leaving record on isn't going to cut it. If you "map" up then down without toggling record off then on, it will treat it as a single gesture "up-down". If you have trained with an up gesture or a gesture that starts with up, it will just match that, and unless you have a stored time series that contains "up-down" it will make no further matches. In your case you would need record 1 ... up ... record 0 record 1 .. down ... record 0. This would apply to both mapping and providing multiple training examples.
I'll take a look at the help file shortly.
Reply to this email directly or view it on GitHubhttps://github.com/cmuartfab/ml-lib/issues/71#issuecomment-37524607 .
closing this issue until further changes in the object...
i'm having trouble using ml.dtw i get a lot of this error when testing:
error: unable to map input
i've updated the help file to show how i'm using it. what am i missing?
a