Gradient Descent with a fixed number of constant pieces (degrees of freedom)
UMRgradDesc_fixed_df(
grad,
init,
stepsize,
MM,
tol = 1e-07,
printevery = Inf,
filename
)
a function(mm) where mm is the previous iterate value (i.e., the estimate vector).
Initial value of estimate ('mm'). The output will be of length length(init).
Gradient descent stepsize. Set carefully!
Number of iterations in which "support reduction" (combining of approximately equal values into a region of constancy) is done (see details and paper). Depending on tol, may not use all MM iterations.
Tolerance: end algorithm once sum(abs(mm-mmprev)) < tol or you hit MM iterations.
integer value (generally << MM). Every 'printevery' iterations, a count will be printed and the output saved.
path1/path2/filename to save output to.
UMRgradDesc_fixed_df does a gradient descent with a fixed (upper bound) on the number of constant segments of the function.
Output of UMRgradDesc_fixed_df is unsorted. Note weights for 'mm' are not passed in; rather they will be contained/used in grad().