Auto-encoder Neural Network for anomaly detection.
Basic tensorflow NN - 9 input neurons, encoder, decoder - attempts to reconstruct the inputs as outputs.
The difference between expected and actual produced reproductions within a set threshold identifies anomalous data points.
Used LOF as baseline truth for training - produced labels from fit_predict with LOF, then trained against those.
Best model is saved within the best_model folder, can be loaded with:
autoencoder = tf.keras.models.load_model('best_model')
# Check its architecture
autoencoder.summary()
Using a NN to identify these types of anomalies only really makes sense if we use as many features as possible. If a user just wants to check anomalies on one feature, like Win Rate, then a NN is going to be outperformed by any of the standard clustering algorithms.
Also, this won't be a generalizable class - whatever amount of features we end up training the model on, that'll have to be what users use, so this might work better as an automated thing we provide for customers, rather than an open source "do whatever with it" sort of thing - if we train it on a ton of previous campaigns we have access to, and set it to run automatically for users that request it, we can get the most of it I think, because it will be predicting on datasets with the same structure as what it was trained on.
We could set it to intake user suggestions on which anomalies they agree with, and which they don't, and use that as continuous training inputs, but we'd have to keep the same features.
Auto-encoder Neural Network for anomaly detection.
Basic tensorflow NN - 9 input neurons, encoder, decoder - attempts to reconstruct the inputs as outputs.
The difference between expected and actual produced reproductions within a set threshold identifies anomalous data points.
Used LOF as baseline truth for training - produced labels from fit_predict with LOF, then trained against those.
Best model is saved within the best_model folder, can be loaded with: