9b2f98b435d6b21a0f5d49c1a5a23c97e7357d6f,finetune/target_models/ordinal_regressor.py,OrdinalRegressor,predict,#OrdinalRegressor#Any#,46

Before Change


        :param X: list or array of text to embed.
        :returns: list of class labels.
        
        return super().predict(X).tolist()

    def predict_proba(self, X):
        
        Produces a probability distribution over classes for each example in X.

After Change


                
            doc_labels.append(label)

            if end_of_doc:
                // last chunk in a document
                means = np.mean(doc_labels, axis=0)
                label = self.input_pipeline.label_encoder.inverse_transform([means])
                all_labels.append(list(label))
        return all_labels

    def predict_proba(self, X):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: 9b2f98b435d6b21a0f5d49c1a5a23c97e7357d6f
Time: 2019-07-17
Author: matthew.bayer@indico.io
File Name: finetune/target_models/ordinal_regressor.py
Class Name: OrdinalRegressor
Method Name: predict


Project Name: IndicoDataSolutions/finetune
Commit Name: e9eb9d3cdef98f21f754b577b88dc259a9914ede
Time: 2019-07-17
Author: matthew.bayer@indico.io
File Name: finetune/target_models/regressor.py
Class Name: Regressor
Method Name: predict


Project Name: facebookresearch/Horizon
Commit Name: e3fcbb639e115e8afe9600bd06aee81acfda6704
Time: 2020-10-13
Author: czxttkl@fb.com
File Name: reagent/training/world_model/seq2reward_trainer.py
Class Name: Seq2RewardTrainer
Method Name: train