wolffd@0: function [net, niter] = logist2FitRegularized(labels, features, maxIter) wolffd@0: wolffd@0: if nargin < 3, maxIter = 100; end wolffd@0: wolffd@0: [D N] = size(features); wolffd@0: weightPrior = 0.5; wolffd@0: net = glm(D, 1, 'logistic', weightPrior); wolffd@0: options = foptions; wolffd@0: options(14) = maxIter; wolffd@0: [net, options] = glmtrain(net, options, features', labels(:)); wolffd@0: niter = options(14); wolffd@0: %w = logist2Fit(labelsPatches(jValidPatches), features(:, jValidPatches)); wolffd@0: