% MAKE PREDICTIONS USING LOGISTIC REGRESSION COEFFICIENTS. Returns the % probability that y=1 for each of the test cases whose inputs are in X, % using the intercept and coefficient parameters in beta. function pred = lrpred (X, beta) lin = beta(1) + X * beta(2:end)'; pred = 1./(1+exp(-lin));