Fraud Detecter (Saffrin, Tillman)

From UBC Wiki

Fraud Detector

Authors:

Saffrin, Tillman

What is the problem?

With banking today being predominantly electronic, there is more access to data regarding people's spending habits and banking transactions. In order to catch banking fraud as soon as possible, we want to implement a fraud detection tool.

What is the something extra?

Our tool will be able to document banking transactions such as purchases or withdrawals or deposit and will output whether or not this activity is suspicious based on previous transactions. The extra part is that this fraud detection model will look at multiple aspects of the transaction at once to determine if suspicious activity has occurred.

The following variables are analyzed:

* The transaction cost compared to the average transaction cost

* Amount spent in the day compared to the average previous daily expenditure

* The country in which the transaction took place

What did we learn from doing this?

What we did

- We created new types in order to represent a bank account and a transaction.

- Created an interface for a user to make transactions with their bank account.

- Recorded the history of transactions made by a user.

- For each aspect of the transaction defined above; we calculated the likelihood of each occurring and then combined these probabilities together to reach a total probability of suspicious activity.

- We lower the threshold for suspicious activity at each potential fraudulent purchase and deactivate the account if there are more than 5 suspicious transactions.

What we learned

The most helpful aspect of Haskell for this project was the type matching. Being able to write simple functions that worked on one aspect of the Transaction data type (the date, the amount of money, or the country) was genuinely helpful. Another useful aspect of Haskell was its capacity to concisely express the tasks that needed to be done. By using list comprehensions and recursion: all of our manipulations to lists do not require lines and lines of code. The machine learning aspect of the project was fairly suited to functional programming, despite the less Haskell-savvy half of our team having some difficulties getting it to work. Overall however the benefits don't seem to be worth it and would be outweighed if you are more comfortable in another programming language.

Links to code etc

https://github.com/Saffring/BankFraudCPSC312