The project contains client programs to train and test the sensors.
The training data needs to be in the following format. This allows the use in the distance evaluation program and in the libsvm-tools programs.
<classid> 1:<SQUAL> 2:<PixAVG> 3:<PixMin> 4:<PixMax> 5:<Shutter> 6:<ShutterMax> 7:<FramePeriod> 8:<FramePeriodMin> 9:<FramePeriodMax> . . .
The parameters 1-9 have to be in ascending order.
The classid
s do not have to be sorted.
This program prints values from selected sensors. It can also be used to generate training data in libsvm format
Usage:
Sensor-Register-Reader Parameters -f <file> File to write data to - "out.txt" is used if not specified -c <comment> Comment to show up atop each read -n <cnt> Number of rounds per read -m <map> Bitmap of sensors to be read (e.g. for sensors 1,3 value is 5) -v <1/0> Save values (with description) (default=1) -s <1/0> Save values in libsvm-training file format (comment=classid)(default=0)
This program uses libsvm to predict the sensors distance to the surface. It can use both training data and model files to generate the internal model. The training data can also be saved as a model file. Beside the distance-prediction on the sensor it can be used to test the training data. Either perform a cross validation check or test it against given test data.
Usage:
Distance-Evaluation Parameters -f <file> Inut file - libsvm-model-file or training data -m <1/0> Use model as input file -n <cnt> Number of lines (used) in training-data-file -t <file> Testfile (instead of sensor input) -p Print probability estimates instead of class predictions -T Make cross validation test -s Save model file (use -o) -o <file> Output filename for model file