Live data from Hacker News

Stochastic gradient descent written in SQL

maxhalford.github.io

1–10 of 187 posts

Re: Stochastic gradient descent written in SQL

#2
This is really interesting, but a basic part I don't understand: What would it actually look like to run this on a live dataset?

If I understand correctly: you'd run the recursive query, it produces results for every step, effectively showing you the progression of output over time, and then once it hits "present day", it completes and stops?

How would you generate results going forward? I.E. A minute elapses after the results return, do you have to re-run the whole query for all time?

Re: Stochastic gradient descent written in SQL

#3

This is really interesting, but a basic part I don't understand: What would it actually look like to run this on a live dataset? If I understand correctly: you'd run the recursive query, it produces results for every step, effectively showing you the progression of output over time, and then once it hits "present day", it completes and stops? How would you generate results going forward? I.E. A minute elapses after t…

Good question. I touched upon this in the conclusion. Basically, if you run this in a streaming SQL database, such as Materialize, then you would get a true online system which doesn't restart from scratch.

Re: Stochastic gradient descent written in SQL

#4
post #3

This is really interesting, but a basic part I don't understand: What would it actually look like to run this on a live dataset? If I understand correctly: you'd run the recursive query, it produces results for every step, effectively showing you the progression of output over time, and then once it hits "present day", it completes and stops? How would you generate results going forward? I.E. A minute elapses after t…

Good question. I touched upon this in the conclusion. Basically, if you run this in a streaming SQL database, such as Materialize, then you would get a true online system which doesn't restart from scratch.

In a non-streaming db What would prevent you from storing the result set and just using the last iteration to calculate the next?

Re: Stochastic gradient descent written in SQL

#5
post #4
post #3

Earlier quoted context omitted.

Good question. I touched upon this in the conclusion. Basically, if you run this in a streaming SQL database, such as Materialize, then you would get a true online system which doesn't restart from scratch.

In a non-streaming db What would prevent you from storing the result set and just using the last iteration to calculate the next?

This is definitely a possibility. What I meant to say is that the implementation in the blog post doesn't support that.

Re: Stochastic gradient descent written in SQL

#6
post #5
post #4

Earlier quoted context omitted.

In a non-streaming db What would prevent you from storing the result set and just using the last iteration to calculate the next?

This is definitely a possibility. What I meant to say is that the implementation in the blog post doesn't support that.

Makes sense, just an insert instead of a select, I used a similar approach on newton-raphson to implement XIRR in SQL and it worked well.
Post reply on HN