Beginning Anomaly Detection Using



Download 26,57 Mb.
Pdf ko'rish
bet177/283
Sana12.07.2021
Hajmi26,57 Mb.
#116397
1   ...   173   174   175   176   177   178   179   180   ...   283
Bog'liq
Beginning Anomaly Detection Using Python-Based Deep Learning

Figure 7-20.  The first five entries of the data frame

Figure 7-21.  The output in Figure 

7-20

 scrolled right

Chapter 7   temporal Convolutional networks




271

you can see that the data set is pretty massive with 284,807 entries in total (the index 

starts at 0). Additionally, notice how the values for time become absurdly large. If you 

pass in values this large into the model for training, you are bound to get errors with 

convergence. Not only that, it’s just good practice to normalize any large values, since it 

improves performance and training efficiency if you pass in smaller values to the model. 

Run the code in Figure 

7-23


 to standardize the values for Time and for Amount.

Now you can see that the values for the columns Time (Figure 

7-24

)

Figure 7-22.  The tail end of the data frame. Notice how large the values for 



time get

df['Amount'] = 

StandardScaler().fit_transform(df['Amount'].values.reshape(-1, 1))

df['Time'] = StandardScaler().fit_transform(df['Time'].values.reshape(-

1, 1))

df.tail()



Figure 7-23.  This code standardizes the values for Time and Amount

Chapter 7   temporal Convolutional networks




272

and for Amount (Figure 

7-25

)

are much smaller and much more manageable numbers to pass in.



Since there are so many entries in the entire data set, it’s best to limit the number 

of “normal” data entries you feed into the model since the model seems to ignore the 

anomalies if the entire data set is passed in. To avoid drowning out the anomalous data 

entries, let’s pick 10,000 normal entries to derive your training and testing data sets from 

(see Figure 

7-26


).

The output should look somewhat like Figure 

7-27

.


Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   173   174   175   176   177   178   179   180   ...   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