This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Is there a direct calculation for gradient descent?

6 posts · 5270 views

This question isn't strictly in CL's domain, if moderators find it a better place - please move it.
So, the wiki article and many examples of gradient descent suggest that the way to calculate the function that is the fastest way to get to the local minimum is by iteratively approaching it in hopes it will converge after *enough* tries. This feels eeky as this also means that there always be an error + this looks like a rather inefficient way to solve the problem.

I am convinced of that there is always either single best or multiple equaly good functions to reach the local minimum, thus there must be a way to find them without any error (within reasonable limitations of how our computations may be precise).

I suspect there must be some direct calculation to find such function, rather then by repetitively trying different hypotheses.

To provide more data: suppose you have a list of conses let it be
(defvar *data* '((x_0 . y_0) (x_1 . y_1) ... (x_i . y_i)))
. The task is to find a function f such that for all
(reduce #'+ (mapcar #'f *data*))
would give you the minimum possible value, given f is of a form:
(defun f (x) (expt (- (car x) (+ b (* (cdr x) k))) 2))
In other words, you need to find b and k to fit them into function f such as the sum of all results of the function applied to the testing set would be the smallest possible.

Re: Is there a direct calculation for gradient descent?

It's only posible if the input is described by analytically solvable function, otherwise you must use numeric methods.
And matematically it's laplace of the input, where laplace is div grad (http://en.wikipedia.org/wiki/Laplace_operator).
cl-2dsyntax is my attempt to create a Python-like reader. My mirror of CLHS (and the dark themed version). Temporary mirrors of aferomentioned: CLHS and a dark version.

Re: Is there a direct calculation for gradient descent?

And I see you want to generate a function based on a template, that's a bit different and more difficult problem.
Search something about minimization of a functional.
cl-2dsyntax is my attempt to create a Python-like reader. My mirror of CLHS (and the dark themed version). Temporary mirrors of aferomentioned: CLHS and a dark version.

Re: Is there a direct calculation for gradient descent?

Thanks, yeah, the minimization is something that rings the bell to me. But what do you mean when you say "analytically solvable" - this must be my laps of technical language, I don't know what does it mean when applied to function, can you please explain or have a link to an article?

Re: Is there a direct calculation for gradient descent?

Aha, I see, thanks for clarification!