The practical upshot: Could one detect such activities based on accelerometer data? Surely yes. However, unless somebody trained it on masturbation, it is unlikely that that is an actual possible output of it.
Details: model format was more or less this
node {
int activity; //positive if this is the terminal
//node and this is the answer, else this is
//not terminal. Then it is the index of the
//input sample to read (times minus one) to
//compare to the next value
float compareWith;
unsigned gotoNodeIdxIfLessThan;
unsigned gotoNodeIdxIfGreaterOrEq;
}
model {
node nodes[];
}
You’d start at node [0] and walk the tree as per comparison instructions (index of input samples and float to compare to) till you reached a terminal node.