arduino / ArduinoTensorFlowLiteTutorials

260 stars 117 forks source link

Normalizing sensor data #27

Open siriusmehta opened 3 years ago

siriusmehta commented 3 years ago

Hi @all ,

I just tried training a model for Punch/Flex gesture and was not able to understand why are we adding 4 and dividing by 8 similarly for 2000 and 4000 for gx values:

tensor += [ (df['aX'][index] + 4) / 8, (df['aY'][index] + 4) / 8, (df['aZ'][index] + 4) / 8, (df['gX'][index] + 2000) / 4000, (df['gY'][index] + 2000) / 4000, (df['gZ'][index] + 2000) / 4000 ]

If I capture my own custom data will these value change if yes then how we can feed in the right values for normalising the input tensor

Thanks

siriusmehta commented 3 years ago

Hi

Thanks,

Finally I get it why we are doing the above math. The numbers 2000 and 4 are coming from the max/min ranges of arduino accelerometer .