blob: d521e8f7afdf268d727aae37fb12a7ebe6f584f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
function [net, niter] = logist2FitRegularized(labels, features, maxIter)
if nargin < 3, maxIter = 100; end
[D N] = size(features);
weightPrior = 0.5;
net = glm(D, 1, 'logistic', weightPrior);
options = foptions;
options(14) = maxIter;
[net, options] = glmtrain(net, options, features', labels(:));
niter = options(14);
%w = logist2Fit(labelsPatches(jValidPatches), features(:, jValidPatches));
|