Skip to content

Simple benchmark for algorithms to be used on BangleJS

License

Notifications You must be signed in to change notification settings

dashavoo/banglejs-algos-tester

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tester code for Bangle JS algorithms

Prerequisites

Compile and run

cd build
cmake ../
cmake --build .
./banglejs-algos-tester

The executable assumes that data files are in ../data/. It outputs a comma-separated table like the following:

steps-controlled, dummy, 100_5.csv, 100, 100
steps-controlled, oxford, 100_5.csv, 1790, 100
steps-uncontrolled, dummy, 3058.csv, 100, 3058
steps-uncontrolled, oxford, 3058.csv, 3301, 3058

the first column is the type of data, the second is the name of the algorithm, the third is the name of the file, the fourth is the step count detected by the algorithm and the last column is the reference.

You can easily import this table into Excel to do run your statistics for example by calling ./banglejs-algos-tester > algos.csv.

Datasets

There are 2 datasets for step counting:

  • controlled: usually short and taken with a reliable reference like manual counting
  • uncontrolled: usually longer and with a less reliable reference, like another step counter

each file name must start with the reference step counter value. For example 125_test.csv means that the reference step value count is 125.

To test new datasets just drop a file with the correct name and format in one of the two folders.

Algorithms

There are currently 3 algorithms: dummy, which always returns 100, espruino, the official algorithm inclued in the Espruino firmware and oxford-step-count, which is based on this.

To add a new algorithm:

  1. place the source code inside the stepcounters folder, possibly in a subfolder
  2. modify stepcounters.c to add calls to the new algorithm
  3. recompile and run

About

Simple benchmark for algorithms to be used on BangleJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.0%
  • CMake 1.0%