1
$\begingroup$

Background

Say I have a dataset of transfers between bank accounts structured like so:

from,     to,      timestamp,             amount
ACT_1,    ACT_2,   2019-01-01 23:59:00,   $123.67
ACT_2,    ACT_5,   2019-02-11 07:23:00,   $347.10
...

The same account can appear in either the from or the to column and can occur multiple times.

I have another table, that indicates whether an account is a "bad actor" or not:

account_number, category
ACT_1,          clean
ACT_2,          fraud
ACT_3,          clean
ACT_4,          clean
ACT_5,          drugs
...

I was to classify all account numbers in the dataset into the possible categories. I would really appreciate some advice with determining how to create features for my training dataset.

Here are some ideas I had:

Throw out the to counter-party.

Final schema would look something like this:

account_number, AVG(timestamp), MAX(timestamp), MIN(timestamp), SUM(amount), COUNT(*), ...

What I don't like about this: I suspect bad actors transact with other bad actors. Throwing out the counter-parties would lose this relationship

Include the counter-parties as binary columns.

Final schema would look something like this:

account_number, transactedWithAct1, transactedWithAct2, transactedWithAct3, ..., AVG(timestamp), MAX(timestamp), MIN(timestamp), SUM(amount), COUNT(*), ...

What I don't like about this: My final dataset has over 600,000 unique accounts (I would need to have over 600,000 columns per row if I used this method)

Conclusion

If anyone has any clever ways of representing counter-parties or any advice on better representations for the existing columns, I would very much appreciate it.

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.