Reputation: 2565
I use Keras backed by Tensorflow to train my models and i have a question about the nr of decimals in the training data. Is cutting down the nr of decimals in the training data affecting the output? My original data has 15 decimals and i would like to cut that down to 8 because that data is well represented with 8 decimals. What is your experience with this?
+-------------------+---------------------+
| Original | round to 8 decimals |
+-------------------+---------------------+
| 0.675477266311645 | 0.675477270000000 |
| 0.670092999935150 | 0.670093000000000 |
| 0.660303473472595 | 0.660303470000000 |
| 0.698482632637023 | 0.698482630000000 |
| 0.747430264949798 | 0.747430260000000 |
| 0.734703838825225 | 0.734703840000000 |
| 0.783161997795104 | 0.783162000000000 |
| 0.760156631469726 | 0.760156630000000 |
| 0.760156631469726 | 0.760156630000000 |
| 0.763582944869995 | 0.763582940000000 |
| 0.766519844532012 | 0.766519840000000 |
| 0.766519844532012 | 0.766519840000000 |
| 0.747919738292694 | 0.747919740000000 |
+-------------------+---------------------+
Upvotes: 0
Views: 513
Reputation: 57709
You answered your question already. If you know that your data is well represented with 8 decimal places, you can cut the rest without losing accuracy. In the end, it will not matter much as internally the places will be used anyway. Just because you leave some places in the input, does not mean that the precision of the variables in the model goes down as well. They will still be (presumably) 32 bit floating point numbers.
Upvotes: 1