Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Gesture Prediction Score Range

Tags:

android

I'm working on a game for Android that uses gestures as input. I've got a working demo, but the gesture recognition seems a bit too liberal (e.g. there are many false positives), and as I'm considering a gesture library of 30 or so, this will be more of a problem as I add in new gestures.

The official documentation is here:

http://developer.android.com/resources/articles/gestures.html

It says:

In this example, the first prediction is taken into account only if it's score is greater than 1.0. The threshold you use is entirely up to you but know that scores lower than 1.0 are typically poor matches.

Okay, that's great, but what is the range of values for prediction.score? Neither this page nor the javadocs appears to provide a range of values. Does anyone here know? I will have to tweak the values anyway, but it would be nice to have some baseline for my guesses, and this seems like a weird oversight of the documentation.

like image 656
polyclef Avatar asked Nov 02 '11 17:11

polyclef


2 Answers

There is no upper limit to the range of prediction.score. A good way to match a gesture is usually to sort the predictions by decreasing score, and if the first gesture has a score > 1, you have a good match.

like image 151
Romain Guy Avatar answered Nov 02 '22 10:11

Romain Guy


I ran into a similar challenge recently and wrote up my experience and conclusions in this question. For me, it boiled down to experimenting with SEQUENCE_SENSITIVE and ORIENTATION_INVARIANT. Hope it helps.

like image 2
Andy Dennie Avatar answered Nov 02 '22 09:11

Andy Dennie