4bdc700248d5a99e7bebe03e767c0befa6be7803,finetune/target_models/comparison_regressor.py,ComparisonRegressor,predict,#ComparisonRegressor#Any#Any#,59

Before Change


        :param pairs: Array of text, shape [batch, 2]
        :returns: list of floats, shape [batch]
        
        return super().predict(pairs=pairs, context=context, **kwargs)
    
    def _predict(self, pairs, context=None, **kwargs):
        
        Produces a floating point prediction determined by the fine-tuned model.

After Change


        :param pairs: Array of text, shape [batch, 2]
        :returns: list of floats, shape [batch]
        
        zipped_data = self.input_pipeline.zip_list_to_dict(X=pairs, context=context)
        raw_preds = self._inference(zipped_data, predict_keys=[PredictMode.NORMAL], context=context, **kwargs)
        return self.input_pipeline.label_encoder.inverse_transform(np.asarray(raw_preds))
    
    def predict_proba(self, pairs, context=None):
        
        Not implemented in regression task.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: 4bdc700248d5a99e7bebe03e767c0befa6be7803
Time: 2020-04-16
Author: benlt@hotmail.co.uk
File Name: finetune/target_models/comparison_regressor.py
Class Name: ComparisonRegressor
Method Name: predict


Project Name: SheffieldML/GPy
Commit Name: 63751de9127ab46ab0374507338e89cd3a1be78f
Time: 2017-06-01
Author: morepabl@amazon.com
File Name: GPy/inference/latent_function_inference/expectation_propagation.py
Class Name: EP
Method Name: inference


Project Name: SheffieldML/GPy
Commit Name: 0c248e752052e18d2467d0e95f07046a666ae817
Time: 2017-03-22
Author: morepabl@amazon.com
File Name: GPy/inference/latent_function_inference/expectation_propagation.py
Class Name: EP
Method Name: inference