In this recipe, you are going to implement a feature-based image classifier using the scikit-image and scikit-learn library functions. A multiclass logistic regression (softmax regression) classifier will be trained on the histogram of oriented gradients (HOG) descriptors extracted from the training images. The following equations show how the parameters for a K-class softmax regression classifier are estimated in the training phase (for example, with stochastic gradient descent) and then the model that is learned is used to predict the probability of a class label given an input image in the testing phase:
