Aside from the obvious imports I've added (import numpy as np, etc),
there are still undefined objects (`names`, `times_`, `feat`,
`bind_ind`) and indentation errors. Can you post a *working* code to be
sped up and a benchmarking test?
As you're using Python 2, you can improve the code with th
rs is the one that learns the parameters, and such that I guess is
> the one that should be improved in order to speed up the process of learning
> the parameter values) in the following link:
> https://codereview.stackexchange.com/questions/183707/speeding-up-the-implementation-of-stoch
Chris Angelico wrote:
> On Thu, Jan 18, 2018 at 6:28 AM, Ned Batchelder
> wrote:
>> You'll have to replace random.choice() with
>> random.choice(list(...)), since you can't random.choice from a set.
>>
>
> Side point: why can't you? You can random.sample from a set,
I'm not sure this was a goo
On Thu, Jan 18, 2018 at 7:19 AM, Ned Batchelder wrote:
> On 1/17/18 2:45 PM, Chris Angelico wrote:
>>
>> On Thu, Jan 18, 2018 at 6:28 AM, Ned Batchelder
>> wrote:
>>>
>>> You'll have to replace random.choice() with
>>> random.choice(list(...)), since you can't random.choice from a set.
>>>
>> Sid
On 1/17/18 2:45 PM, Chris Angelico wrote:
On Thu, Jan 18, 2018 at 6:28 AM, Ned Batchelder wrote:
You'll have to replace random.choice() with
random.choice(list(...)), since you can't random.choice from a set.
Side point: why can't you? You can random.sample from a set, but
random.choice requi
On Thu, Jan 18, 2018 at 6:28 AM, Ned Batchelder wrote:
> You'll have to replace random.choice() with
> random.choice(list(...)), since you can't random.choice from a set.
>
Side point: why can't you? You can random.sample from a set, but
random.choice requires a sequence. It seems perfectly sane
that should be improved in order to speed up the process of learning
the parameter values) in the following link:
https://codereview.stackexchange.com/questions/183707/speeding-up-the-implementation-of-stochastic-gradient-ascent-in-python
It looks like you have lists that you are doing "in
; updateFactors is the one that learns the parameters, and such that I guess is
> the one that should be improved in order to speed up the process of learning
> the parameter values) in the following link:
> https://codereview.stackexchange.com/questions/183707/speeding-up-the-implementation-of-st
process of learning
the parameter values) in the following link:
https://codereview.stackexchange.com/questions/183707/speeding-up-the-implementation-of-stochastic-gradient-ascent-in-python
--
https://mail.python.org/mailman/listinfo/python-list