def ensemble(self, df):
    preds = []
    probs = []
    for (id, row) in df.iterrows():
        if (row['timestamp'] == 1):
            preds.append('TIMESTAMP')
            probs.append(5.0)
        elif (row['bert_labels'] == row['diff_labels']):
            preds.append(row['bert_labels'])
            probs.append((row['bert_probs'] + row['diff_probs']))
        elif (row['bert_labels'] == row['trie_labels']):
            preds.append(row['bert_labels'])
            probs.append((row['bert_probs'] + row['trie_probs']))
        elif (row['trie_labels'] == row['diff_labels']):
            preds.append(row['trie_labels'])
            probs.append((row['trie_probs'] + row['diff_probs']))
        elif (row['diff_probs'] >= 0.4):
            preds.append(row['diff_labels'])
            probs.append(row['diff_probs'])
        elif (row['trie_probs'] >= 0.25):
            preds.append(row['trie_labels'])
            probs.append(row['trie_probs'])
        else:
            preds.append(row['bert_labels'])
            probs.append((row['bert_probs'] / 3))
    return (preds, probs)
def ensemble(self, df):
    preds = []
    probs = []
    for (id, row) in df.iterrows():
        if (row['timestamp'] == 1):
            preds.append('TIMESTAMP')
            probs.append(5.0)
        elif (row['bert_labels'] == row['diff_labels']):
            preds.append(row['bert_labels'])
            probs.append((row['bert_probs'] + row['diff_probs']))
        elif (row['bert_labels'] == row['trie_labels']):
            preds.append(row['bert_labels'])
            probs.append((row['bert_probs'] + row['trie_probs']))
        elif (row['trie_labels'] == row['diff_labels']):
            preds.append(row['trie_labels'])
            probs.append((row['trie_probs'] + row['diff_probs']))
        elif (row['diff_probs'] >= 0.4):
            preds.append(row['diff_labels'])
            probs.append(row['diff_probs'])
        elif (row['trie_probs'] >= 0.25):
            preds.append(row['trie_labels'])
            probs.append(row['trie_probs'])
        else:
            preds.append(row['bert_labels'])
            probs.append((row['bert_probs'] / 3))
    return (preds, probs)