Matrix and Vector Operations in Logistic Regression