10 ms·
> What sort of performance do you get with TensorFlow vs other implementations of Needleman-Wunsch? TensorFlow runs > 10,000 instances of the Needleman-Wunsch
by jostmey 7y ago
> What sort of performance do you get with TensorFlow vs other implementations of Needleman-Wunsch?
TensorFlow runs > 10,000 instances of the Needleman-Wunsch algorithm in parallel. But I believe each instance of algorithm runs in serial. This is very efficient if all the sequences are roughly the same length, allowing for millions of sequences to be processed each second.
Here's my implementation of the Needleman-Wunsch algorithm: https://github.com/jostmey/dkm/blob/master/antigen-classification-problem/model/alignment_score.py https://github.com/jostmey/dkm/blob/master/antigen-classific...
> What scores did you use for gap opens and extensions?
Another great question! There are two gap penalties. One for skipping weights and one for skipping features. If I know there are always more features than weights, then I set the penalty for skipping a feature to zero. This does not penalize the model for having more features than weights. I then set the penalty for skipping weights to a value approximating negative infinity. This ensures every weight is used and is not wasted.