220bbe01ba1ac54adba6bc0e301cb22c7d9b90bb,smart_importer/predict_payees.py,PredictPayees,enhance_transactions,#PredictPayees#,88

Before Change


            return self.imported_transactions

        // predict payees
        self.transactions = self.imported_transactions
        if self.predict_payees:
            logger.debug("About to generate predictions for payees...")
            predicted_payees: List[str]
            predicted_payees = self.pipeline.predict(self.transactions)
            self.transactions = [ml.add_payee_to_transaction(*t_p, overwrite=self.overwrite_existing_payees)
                            for t_p in zip(self.transactions, predicted_payees)]
            logger.debug("Finished adding predicted payees to the transactions to be imported.")

        // suggest likely payees

After Change


            return self.imported_entries

        updated_transactions: List[Transaction]
        updated_transactions = list(filter_txns(self.imported_entries))

        // predict payees
        if self.predict_payees:
            logger.debug("About to generate predictions for payees...")
            predicted_payees: List[str]
            predicted_payees = self.pipeline.predict(updated_transactions)
            updated_transactions = [ml.add_payee_to_transaction(*t_p, overwrite=self.overwrite_existing_payees)
                            for t_p in zip(updated_transactions, predicted_payees)]
            logger.debug("Finished adding predicted payees to the transactions to be imported.")

        // suggest likely payees
        if self.suggest_payees:
            // get values from the SVC decision function
            logger.debug("About to generate suggestions about likely payees...")
            decision_values = self.pipeline.decision_function(updated_transactions)

            // add a human-readable class label (i.e., payee"s name) to each value, and sort by value:
            suggested_payees = [[payee for _, payee in sorted(list(zip(distance_values, self.pipeline.classes_)),
                                                              key=lambda x: x[0], reverse=True)]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: beancount/smart_importer
Commit Name: 220bbe01ba1ac54adba6bc0e301cb22c7d9b90bb
Time: 2018-05-08
Author: patrick@ch.tario.org
File Name: smart_importer/predict_payees.py
Class Name: PredictPayees
Method Name: enhance_transactions


Project Name: stanford-mast/nn_dataflow
Commit Name: ef4353bd24b9d781c2dfa9cd2146d9b87e63b6f1
Time: 2017-05-01
Author: mgao12@stanford.edu
File Name: nn_dataflow/Scheduling.py
Class Name: Scheduling
Method Name: schedule_search


Project Name: explosion/spaCy
Commit Name: fe498b3d5e1e29fb756c203d50e217e8f258e561
Time: 2017-11-06
Author: ines@ines.io
File Name: examples/training/train_textcat.py
Class Name:
Method Name: main