I implemented a gradient descent algorithm to minimize a cost function in order to gain a hypothesis for determining whether an image has a good quality. I did that in Octav
its cleaner this way, and vectorized also
predictions = X * theta; errorsVector = predictions - y; theta = theta - (alpha/m) * (X' * errorsVector);