Interleaving pos/neg prompts to match what the repe code expects #59
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.
It appears that the original Repe reading vector code expects every positive example to be paired with its corresponding negative example next to it in a big list passed to the
find_directions()
method. This isn't documented anywhere, but means we can't simply pass prompts to thefind_directions()
method unimpeded. Also, the Repe PCA code doesn't properly reflect each difference vector across the origin, so it's important to have a balance of<neg, pos>
and<pos, neg>
pairs passed to thefind_directions()
method.This PR addresses these issues by adding a
multi_answer_method
param to theRepeReadingControl
algorithm. By default, this will select just the first incorrect answer to pair with the correct answer, but can also be set torandom_incorrect
to pick at random, orrepeat_correct
to instead duplicate the correct answer to pair with every incorrect answer. This PR also alternates the order of the<neg, pos>
for each example to try to ensure a good balance of directions for PCA.