Conversation
… the inchikey_pair_selection wrapper
…lways first and neg always second
…r to better reflect functionality.
…e the standard sampling algorithm.
…lgorithm function names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Many of the changes are pure refactoring, which in the end made it very easy to add the balancing across ionmodes. These refactoring steps are:
After these changes (which didn't add any new functionality), I added the cross-ionization mode capabilities. These can all be found in the inchikey_pair_selection_cross_ionmode.py. This works as follows: 3 SpectrumPairGenerators are made. 1 for pos-pos, 1 for pos-neg and 1 for neg-neg. For the pos-pos and neg-neg this is the same as before, for the across ionmode I had to reimplement the inchikey pair generator and SpectrumPairGenerator. (all in inchikey_pair_selection_cross_ionmode.py). These 3 Generators are combined into a single Generator in CombinedSpectrumGenerator, which just loops over the 3 generators one by one. This CombinedSpectrumGenerator is passed to TrainingBatchGenerator, so TrainingBatchGenerator did not have to be adapted for the new cross ion mode capability.
Note: The new version is fully backwards compatible; The old models work with this version and the new models work on version 2.5.4. So save to merge in that sense.