for example where you define your arguments why are you using itertools.product?
-
-
does that mean I have to use itertools.combinations? my loop is outside all this... hmm...
2 replies 0 retweets 0 likes -
Replying to @o_guest @seaandsailor
my point is that you don't need to use the loop. I use itertools because I want all combinations of lists A and B.
1 reply 0 retweets 1 like -
map will take care of splitting your array of arguments and combine the results for you.
1 reply 0 retweets 1 like -
-
sorry I don't get how to use combinations to get what I want into a single array — and then the function has to accept the whole array?
2 replies 0 retweets 0 likes -
Replying to @o_guest @seaandsailor
nop. In your case you actually need something like: results = mp.starmap(calculate_pairwise_distance, combinations(X,X)).
2 replies 0 retweets 0 likes -
or why not use n_jobs param of http://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.pairwise_distances.html … ?
1 reply 0 retweets 0 likes -
Replying to @draxus @seaandsailor
because I only started working using these libraries literally yesterday so I'm a n00b OK I'll try that too feels a bit anti-educational to
1 reply 0 retweets 0 likes -
be just trying random stuff without learning what I am trying exactly but I'll give that a go...
2 replies 0 retweets 0 likes
hang on it's just another pairwise distance calculator that will certainly run out of memory... I need around 50 million data points!!
-
-
yep memory error
1 reply 0 retweets 0 likes - 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.