81e73bcd883ef83af9be3f5722d8bcc6ffa1146f,qanta/guesser/tfidf.py,TfidfGuesser,guess,#TfidfGuesser#,37

Before Change


        guess_scores = guess_matrix.max(axis=1)
        guess_indices = guess_matrix.argmax(axis=1)
        guesses = []
        for idx, s in zip(guess_indices, guess_scores):
            guesses.append([(self.i_to_ans[idx], s)])

        return guesses

    def save(self, directory: str) -> None:
        with open(os.path.join(directory, "params.pickle"), "wb") as f:

After Change


        guess_scores = guess_matrix.max(axis=1)
        guess_indices = guess_matrix.argmax(axis=1)
        guesses = []
        for i in range(len(questions)):
            idx = guess_indices[i]
            score = guess_indices[i]
            guesses.append([(self.i_to_ans[idx], score)])

        return guesses

    def save(self, directory: str) -> None:
        with open(os.path.join(directory, "params.pickle"), "wb") as f:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: Pinafore/qb
Commit Name: 81e73bcd883ef83af9be3f5722d8bcc6ffa1146f
Time: 2017-09-25
Author: ski.rodriguez@gmail.com
File Name: qanta/guesser/tfidf.py
Class Name: TfidfGuesser
Method Name: guess


Project Name: adobe/NLP-Cube
Commit Name: 8cb499760b45f404269e61846f31134df6a2d0bc
Time: 2018-03-27
Author: dumitrescu.stefan@gmail.com
File Name: cube/generic_networks/tokenizers.py
Class Name: TieredTokenizer
Method Name: _get_tokens


Project Name: Pinafore/qb
Commit Name: 81e73bcd883ef83af9be3f5722d8bcc6ffa1146f
Time: 2017-09-25
Author: ski.rodriguez@gmail.com
File Name: qanta/guesser/tfidf.py
Class Name: TfidfGuesser
Method Name: guess


Project Name: fmfn/BayesianOptimization
Commit Name: ad5cab5a112c1f0cc25827f902ab26ad2b25f238
Time: 2017-03-12
Author: aman.bhatia@outlook.com
File Name: bayes_opt/bayesian_optimization.py
Class Name: BayesianOptimization
Method Name: initialize