He Shiming

Shanghai, China

kaoya.com

Age: 33

Creator of Bizble, 雅思听力宝, 考鸭, Toppin'Wiper, MediaMan and Goals.io.

Independent developer of desktop, web, and mobile platforms.

UI designer.

Jun
25
awarded Citizen Patrol
Jun
4
awarded Popular Question
May
22
comment Class imbalance problem - Random under sampling
From what I understand, the recall for the 0.5% class will be bad, unless feature selection is obviously distinct. I've worked with 7 to 1, or 8 to 1 classification situations. What I learned is that because of statistical nature of models (such as logistic regression), a model will definitely be benefit from a balanced statistical distribution. You may have to artificially inject 0.5% class samples, until an optimal recall is reached.
May
20
comment Python, optimizing a list comprehension for string concatenation
Thank you all, I'll definitely do some research together on serialization to see if anything can be done there.
May
20
accepted Python, optimizing a list comprehension for string concatenation
May
20
comment Python, optimizing a list comprehension for string concatenation
Well, serialization is not the culprit at the moment. I've already used the best possible solution: '\t'.join(strings), and it's much faster than anything else.
May
20
comment Python, optimizing a list comprehension for string concatenation
Thank you for the pointers. I have implemented pre-calculation, though still with str concatenation instead of formatting (which is slower). It's faster but I wish I could do something to the list comprehension itself.
May
20
comment Python, optimizing a list comprehension for string concatenation
Unfortunately, yes because eventually this list has to be serialized and sent to another module.
May
20
reviewed Approve suggested edit on Python, optimizing a list comprehension for string concatenation
May
20
comment Python, optimizing a list comprehension for string concatenation
Yes, it's similar to my original solution.
May
20
comment Python, optimizing a list comprehension for string concatenation
s is a string with length in range 4 to 32
May
20
asked Python, optimizing a list comprehension for string concatenation
May
18
awarded Yearling
May
18
awarded Yearling
May
6
reviewed Approve suggested edit on Implement Ctrl+C cancelling in python multiprocessing
May
6
comment Numpy: calculate based on previous element?
Thank you very much. This is exactly what I'm looking for.
May
6
accepted Numpy: calculate based on previous element?
May
6
comment Numpy: calculate based on previous element?
Indeed what I wanted is recursive, I didn't realize that and I expect numpy to be capable of this through some magic slicing. Thank you for the explanation. I'll stay with the for loop.
May
6
comment Numpy: calculate based on previous element?
Hmm... what I meant is this is the pseudo code, to be converted into numpy. I thought I was clear that I wanted a numpy solution.
May
6
revised Numpy: calculate based on previous element?
added 101 characters in body
1 2 3 4 5