Robust regression on clustered data and signature based online Arabic handwriting recognition