Applying Different Regression Algorithms on images using R