Automatically detect / suggest category
Opened this issue · 1 comments
Right now the user has to select the category for each transaction. We can improve this by automatically selecting a category.
Option 1: Select the last used category
Option 2: Use KNN to make an educated guess on which category to pick.
Ideally we'd want to use the following features:
- day of the month
- transaction value
- transaction type (income / expense)
However, there is a worry here that changing the category after the user has entered the value could be confusing (since the category would change). A solution would be to identify the category based on just day of the month
and type
, then, once the user adds the value, we can run the algo again and suggest a new category
Going with KNN.
- We'll use https://www.npmjs.com/package/k.n.n
- Train on data for the past 6 months
For the purpose of this implementation, we'll ignore any optimizations, we'll go with a static value for k=3
For the scope of this exercise, we will not be running validation on this algorithm.