We will use SoftMax regression as a multiclass classifier : \begin{align} p(y=i|\boldsymbol{x};W) = \frac{e^{\boldsymbol{w}_i^T \boldsymbol{x}}}{\sum_{j=0}^9 e^{\boldsymbol{w}_j^T}}, \end{align} Where \(p(y=i|\boldsymbol{x};W)\) is the probability that input \(\boldsymbol{x}\) is the \(i\)-th digit, \(i\in[0,9]\). We can use this information for prediction by taking maximum probability: \begin{align} y_{pred}=\arg\max_i p(y=i|\boldsymbol{x}) \end{align}