Summary

In this chapter, we have used a dataset having more than 284,807 instances of credit card use and for each transaction where only 0.172% transactions are fraudulent. We have seen how we can use autoencoders to pre-train a classification model and how to apply anomaly detection techniques to predict possible fraudulent transactions from highly imbalanced data—that is, we expected our fraudulent cases to be anomalies within the whole dataset.

Our final model now correctly identified 83% of fraudulent cases and almost 100% of non-fraudulent cases. Nevertheless, we have seen how to use anomaly detection using outliers, some ways of hyperparameter tuning, and, most importantly, feature selection.

A recurrent neural network (RNN) is a class of artificial neural network where connections between units form a directed cycle. RNNs make use of information from the past. That way, they can make predictions in data with high temporal dependencies. This creates an internal state of the network that allows it to exhibit dynamic temporal behavior.

An RNN takes many input vectors to process them and output other vectors. Compared to a classical approach, using an RNN with Long Short-Term Memory cells (LSTMs) requires almost no feature engineering. Data can be fed directly into the neural network, which acts like a black box, modeling the problem correctly. The approach here is rather simple in terms of how much of the data was preprocessed.

In the next chapter, we will see how to develop an machine learning project using an RNN implementation called LSTM for human activity recognition (HAR), using a smartphones dataset. In short, our machine learning model will be able to classify the type of movement from six categories: walking, walking upstairs, walking downstairs, sitting, standing, and laying.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset