Inspiration
- We wanted to explore new APIs while also solving a real-world problem. Many fraud detection systems are based solely on heuristics, but we wanted to try using machine learning techniques.
What it does
- Queries CapitalOne's Nessie API for a user's transactions
- Trains a SVM, and continuously queries for new transactions
- Looks for anomalies using the SVM
- If an anomaly is detected, send the user a text message with the details of the offending transaction(s)
How we built it
- Since the Capital One API didn't have a good Python wrapper, we first built a complete python wrapper for the API that covers all the endpoints.
- For classification we decided to use a support vector machine provided by the scikit-learn package.
- After initially getting a user's transactions and training the SVM on them we continuously query the API for new transactions. We classify the new transactions using the SVM.
- If the transaction trips our SVM, then we use the Twilio API to send the user a text message.
Challenges we ran into
- The biggest challenge we had was reliably classifying transactions. We ended up using only 3 parameters: amount and the longitude and latitude of the merchant. We only started getting reliable predictions after we normalized the inputs to a range from 0 to 1
Accomplishments that we're proud of
- The complete API wrapper for the Capital One API.
- Choosing and fine-tuning the right machine learning model.
What we learned
- Gained more experience with machine learning classification
- Used some new APIs
What's next for Fraud Alert
- We would like to ask the user for a confirmation on whether the transaction was actually fraudulent or not. If it was, then we would cancel the purchase.
- We would also like to keep track of the user's budget and alert them if they are close to exceeding it.