e9eb9d3cdef98f21f754b577b88dc259a9914ede,finetune/target_models/regressor.py,Regressor,predict,#Regressor#Any#,36
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
for _, start_of_doc, end_of_doc, label, _ in self.process_long_sequence(X, task="regression"):
if start_of_doc:
// if this is the first chunk in a document, start accumulating from scratch
doc_labels = []
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):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances 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: 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: jhfjhfj1/autokeras
Commit Name: a6819ac67444b66143ab8e0cad8a42cb7635730d
Time: 2020-07-17
Author: haifengj@google.com
File Name: autokeras/blocks/basic.py
Class Name: ResNetBlock
Method Name: build