What I am trying to do?
Using the sensor of Android, I have collected lot of acceleration values when some diabetic patients were running to do physical
You should consider the directions of each component of acceleration. Think about A 3D vector. There’s no way to determine positivity or negativity; it’s direction is denoted by a unit vector pointing the same way. So in essence, 3D vectors (total acceleration) are not positive or negative (unless of course all 3 components are one or the other). So you should consider the positivity of each in your code.