Skip to content

Commit

Permalink
Sort posting accounts in PredictPostings.target
Browse files Browse the repository at this point in the history
The order shouldn't matter so this will improve prediction quality in
cases where accounts are present in different orders.
  • Loading branch information
m-d-brown committed Apr 10, 2023
1 parent 554232c commit aff5273
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smart_importer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class PredictPostings(EntryPredictor):
@property
def targets(self):
return [
" ".join(posting.account for posting in txn.postings)
" ".join(sorted(posting.account for posting in txn.postings))
for txn in self.training_data
]

Expand Down

0 comments on commit aff5273

Please sign in to comment.