How multiple loop for speed

 

 

 Best known a problem inside the group

NK (659324338) 2019/8/1 10:44:51 big God numpy library familiar not ask a question NK (659324338) 2019/8/1 10:45:46



Such a procedure can be converted to a double matrix operation without using a for loop
NK (659324338) 2019/8/1 10:48:05

Programs like this too inefficient
Peng Zhenyu -CPDI (1679468600) 2019/8/1 10:55:03
nothing  that you numba with
automatic optimization cycle
fast off
JNU - Getting Started (1242441055) 2019/8/1 10: 56:52
first content inside the combination (i, j) generating a
devil - Shenzhen <[email protected]> 2019/8/1 11:07:23
@ Pengzhen Yu -CPDI numba is really artifact ah
Pengzhen Yu -CPDI (1679468600 ) 2019/8/1 11:14:49
and very convenient to be able to add a decorator acceleration particularly
Pengzhen Yu -CPDI (1679468600) 2019/8/1 11:15:14
long as the program cycle and particularly in the numerical calculation, then

Europe Wong Ah Feng (67,106,362) 2019/8/1 11:18:35
words asking
God knows ah
I have not downloaded python
and it made you speed-related
Peng Zhenyu -CPDI (1679468600) 2019/8/1 11:19: 37
I have been directly under the anaconda with its python that comes with the
artificial intelligence networkwww.aiaor.com <[email protected]> 2019/8/1 14:48:27

hustxun- Huazhong University (252,472,925) 16:59:51 Technology 2019/8/1
@NK do not know what will happen to accelerate, to you program is too inefficient, too many useless operation
NK (659324338) 2019/8/1 17:01:21
this optimization requires a deeper level, even with numba, as if speed is not obvious
NK (659324338) 2019/8 / 17:02:10 1
@ hustxun- Huazhong University of Science and Technology 
but numba is a kind of thinking
optimization program from the linguistic level
, but if the program is written sucks, language level optimization is still limited
NK (659324338) 2019/8/1 17:04: 43
https://stackoverflow.com/questions/20574257/constructing-a-co-occurrence-matrix-in-python-pandas#comment30776786_20574460
on Stack Overflow someone gives a good program that I want
all converted matrix operating
hustxun- Huazhong University of Science and Technology (252 472 925) 2019/8/1 17:05:16
reverse thinking ah, converted to "fill in" process can be, and prepare a N * N of the empty table, turn on the content of each each element of each line and look for its i-th row j-th column through the dictionary, plus a bar on the line
NK (659324338) 2019/8/1 17:08:34
you say I tried, that the above has improved, but not the optimal
NK (659324338) 2019/8/1 17:10:22

@ hustxun- Huazhong University of Science optimal Stack Overflow above should be answered
at present I see is the best return on Stack Overflow
hustxun- Huazhong University of Science and Technology (252 472 925) 2019/8/1 17:14:38
not fine See, have not read the last dot features, but there is a K [i, j] + = 1, it should be possible, this is the filling operation
NK (659324338) 2019/8/1 17:16:14
above If instead Python list comprehension style do not know how efficient?
hustxun- Huazhong University (252,472,925) Technology 2019/8/1 17:17:46
not too concerned about this, and the key is the algorithm can not counteract too, to avoid repeated operations, too low-level optimization of the operation had to be converted to c language
NK (659324338 ) 2019/8/1 17:19:13
as a coder, we should should have a perfect march toward the goal it
hustxun- Huazhong University of Science and Technology (252 472 925) 2019/8/1 17:20:04

Guess you like

Origin www.cnblogs.com/www-caiyin-com/p/11286807.html