Beginning Anomaly Detection Using



Download 26,57 Mb.
Pdf ko'rish
bet103/283
Sana12.07.2021
Hajmi26,57 Mb.
#116397
1   ...   99   100   101   102   103   104   105   106   ...   283
Bog'liq
Beginning Anomaly Detection Using Python-Based Deep Learning

 Deep  Autoencoders

You do not have to limit yourself to a single layer as encoder or decoder; you can use a 

stack of layers. It’s not a good idea to use too many hidden layers, and how many layers 

depends on the use case, so you have to play with it to seek the optimal number of layers 

and the compressions.

The only thing that really changes is the number of layers. Shown below is the simple 

autoencoder with multiple layers.

You will use the example of credit card data to detect whether a transaction is 

normal/expected or abnormal/anomaly. Shown below is the data being loaded into 

Pandas dataframe.

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 abnormal data in training 

will train the autoencoder to learn that the anomalies are actually normal, which goes 

against your goal. Split the dataframe into training and testing data sets (80-20 split).

Now it’s time to create a deep neural network model with three layers for the encoder 

layer and three layers as part of decoder layer. You will encode the 29 columns of the 

input credit card dataset into 16, then 8, and then 4 features using the encoder. The 

decoder expands the 4 back into the 8 and then 16 and then finally into 29 features. 

Figure 


4-26

 shows the code to create the neural network.



Figure 4-25.  Model graph created by TensorBoard

Chapter 4   autoenCoders




143

Figure 


4-27

 shows the graph of the model as visualized by TensorBoard.




Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   99   100   101   102   103   104   105   106   ...   283




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish