R is way too slow, use MATLAB instead, but now with validation acc. too