GSoC Accelerometer-based Gestures Update 3

Paul-Valentin Borza paulvalentin at borza.ro
Sun Jun 15 18:52:52 CEST 2008


Just tried Octave. I had a function written in C++ on Windows that
generated Matlab code and tried one of those files with Octave.
It didn't work from the first try, but I removed the unsupported features like
set(gcf, 'Name', ['CDHMM [' mfilename ']: A']);

set(gcf, 'NumberTitle', 'off');


and everything worked like a charm (those unsupported features weren't
critical) :) Thanks!

On Sun, Jun 15, 2008 at 7:15 PM, Koen Kooi <k.kooi at student.utwente.nl> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Op 15 jun 2008, om 14:51 heeft Paul-Valentin Borza het volgende geschreven:
>
>> I've re-implemented hidden Markov Models. The evaluation algorithm
>> Viterbi that decodes the observation sequence works perfectly.
>> I've made a terrible mistake by using floats instead of doubles (I've
>> used doubles on Windows) and even with scaling, to prevent underflow,
>> underflow still happens.
>
> Floating point operations are *very* slow, you can get a 50 time speedup by
> avoiding floats in your code.
>
>> Viterbi uses float representations and logarithms and doesn't need
>> scaling as underflow doesn't happen.
>> Underflow happens only at the training of the gestures and I'll have
>> to change the types to double.
>> I've tried a different approach when I created four models, than the
>> one I had on Windows, where each model used 27 states.
>> The Spoken Language Processing books says that it's a better to have
>> the number of states dependent of the model (on how compex the model
>> gets).
>> I've given some initial estimates to four models (left, right, forward
>> and up) and mapped these models to actions in Amarok (next, prev,
>> volumeUp and mute) with dcop.
>> For example, I've modeled right with 3 states (one state is the
>> initial state where you hold the Wii in your hand, the second is when
>> you make your push to your right and the final state is when you stop
>> moving your hand).
>>
>> In currently working on gesture training to change the types to
>> double. Another thing I miss is Matlab (which I don't have on Ubuntu)
>> and can't seem to find it anywhere.
>> However, I've found Mathematica on Linux - I'm not familiar with
>> Mathematica, but this one seems to have a better syntax and it draws
>> antialiased plots (Matlab can't do antialias unfortunately).
>
> Try octave.
>
>>
>>
>> Everything was checked in to SVN.
>>
>> --
>> http://www.borza.ro
>>
>>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Darwin)
>
> iD8DBQFIVUAeMkyGM64RGpERAgNmAJ9gRxa3uTEaBRXuGN9/cbDsHb07hgCePwym
> zc3jX4D+86xEHAQ+zyAcpBA=
> =dZs7
> -----END PGP SIGNATURE-----
>



-- 
http://www.borza.ro



More information about the openmoko-devel mailing list