comparison toolboxes/distance_learning/mlr/regularize/regularizeTwoFull.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:cc4b1211e677
1 function r = regularizeTwoFull(W, X, gradient)
2 %
3 % r = regularizeTwoFull(W, X, gradient)
4 %
5 %
6 d = length(W);
7
8 if gradient
9 r = W / d;
10 else
11 r = sum(sum(W.^2)) / (2 * d);
12 end
13 end