167
You will use the example of credit card data to detect whether a transaction is
normal/expected or abnormal/anomaly. Figure
4-61
shows the data being loaded into a
Pandas dataframe.
Figure 4-60. Code to visualize the results
Chapter 4 autoenCoders
168
You will collect 20k normal and 400 abnormal records. You can pick different ratios
to try, but in general more normal data examples are better because you want to teach
your autoencoder what normal data looks like. Too much of abnormal data in training
will train the autoencoder to learn that the anomalies are actually normal, which goes
against your goal. Figure
4-62
shows the code to take the majority of normal data records
with a few abnormal records.
Do'stlaringiz bilan baham: