Beginning Anomaly Detection Using



Download 26,57 Mb.
Pdf ko'rish
bet114/283
Sana12.07.2021
Hajmi26,57 Mb.
#116397
1   ...   110   111   112   113   114   115   116   117   ...   283
Bog'liq
Beginning Anomaly Detection Using Python-Based Deep Learning

Figure 4-61.  Code to load the dataset using Pandas

Figure 4-62.  Code to take the majority of normal data records with a few 

abnormal records

Figure 4-63.  Code to split the data into train and test subsets

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

4-63

 shows 


the code to split the data into train and test subsets.

Chapter 4   autoenCoders




169

The biggest difference between the standard autoencoders you have seen so far and 

the variational autoencoder is that here you do not just take the inputs as is; rather, you 

take the distribution of the input data and then sample the distribution. Figure 

4-64

 

shows the code to implement such a sampling strategy.



Figure 4-64.  Code to sample the distributions

Now it’s time to create a simple neural network model with an encoder and a 

decoder phase. You will encode the 29 columns of the input credit card dataset into 12 

features using the encoder. The encoder uses the special distribution sampling logic 

to generate two parallel layers and then wraps the sampling output (above) as a Layer 

object.


The decoder phase uses this latent vector and reconstructs the input. While doing 

this, it also measures the error of reconstruction in order to minimize it. Figure 

4-65

 

shows the code to create the neural network.



Chapter 4   autoenCoders


170

Figure 


4-66

 shows the code to show the neural network.



Figure 4-65.  Code to create the neural network

Chapter 4   autoenCoders




171


Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   110   111   112   113   114   115   116   117   ...   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