% BINARY LOGISTIC REGRESSION ESTIMATION USING A QUADRATIC PENALTY. Returns % the maximum penalized likelihood estimate for the parameters of a logistic % regression model. The inputs in the training cases are in X, which should % be a matrix with one row per training case and one column per input variable. % The training targets are in y, which should be a vector of 0/1 values. The % first element of the parameter vector returned is the intercept; the % remaining elements are the coefficients of the inputs. function est = lrest (y, X, lambda) est = fminunc (@(beta) - lrloglike(y,X,beta), zeros(1,size(X,2)+1));