First of all, maybe try using all the data, not just the last row of every 10 samples. This way, you will increase your dataset size.
Secondly, in training, you used the 4th row of every 10 samples, while in testing, you used the 10th. You should treat both datasets the same way, not instead of randomly selecting rows.