Page 1 of 1

Is there a direct calculation for gradient descent?

Posted: Mon Sep 10, 2012 2:30 am
by wvxvw
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

Code: Select all

(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

Code: Select all

(reduce #'+ (mapcar #'f *data*))
would give you the minimum possible value, given f is of a form:

Code: Select all

(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?

Posted: Mon Sep 10, 2012 2:48 am
by Goheeca
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).

Re: Is there a direct calculation for gradient descent?

Posted: Mon Sep 10, 2012 2:55 am
by Goheeca
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.

Re: Is there a direct calculation for gradient descent?

Posted: Mon Sep 10, 2012 3:15 am
by wvxvw
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?

Posted: Mon Sep 10, 2012 3:22 am
by Goheeca
If we have some kind of a nonlinear system so it's not analytically solvable.
For example: a transcendental equation, Navier-Stokes, EFE.

Re: Is there a direct calculation for gradient descent?

Posted: Mon Sep 10, 2012 3:26 am
by wvxvw
Aha, I see, thanks for clarification!