Beginning Anomaly Detection Using



Download 26,57 Mb.
Pdf ko'rish
bet153/283
Sana12.07.2021
Hajmi26,57 Mb.
#116397
1   ...   149   150   151   152   153   154   155   156   ...   283
Bog'liq
Beginning Anomaly Detection Using Python-Based Deep Learning

recurrent_dropout: Float between 0 and 1. Fraction of the units to 

drop for the linear transformation of the recurrent state.

• 

implementation: Implementation mode, either 1 or 2. Mode 1 will 

structure its operations as a larger number of smaller dot products 

and additions, whereas mode 2 will batch them into fewer, larger 

operations. These modes will have different performance profiles on 

different hardware and for different applications.

• 

return_sequences: Boolean. Whether to return the last output in the 

output sequence, or the full sequence.

Chapter 6   Long Short-term memory modeLS 



233

• 

return_state: Boolean. Whether to return the last state in addition 

to the output. The returned elements of the state’s list are the hidden 

state and the cell state, respectively.

• 

go_backwards: Boolean (default False). If True, process the input 

sequence backwards and return the reversed sequence.

• 

stateful: Boolean (default False). If True, the last state for each 

sample at index i in a batch will be used as the initial state for the 

sample of index i in the following batch.

• 

unroll: Boolean (default False). If True, the network will be unrolled, 

else a symbolic loop will be used. Unrolling can speed up a RNN, 

although it tends to be more memory-intensive. Unrolling is only 

suitable for short sequences.

If you notice the LSTM call in the above code snippet, there is a parameter time_

steps=48 being used. This is the number of steps in the sequence that is used in training 

LSTM. 48 clearly means 24 hours, since your data points are 30 minutes apart. You can 

try changing this to 64 or 128 and see what happens to the output.

Figure 


6-25

 shows the code to split the sequence into a tumbling window of 

sub-sequences of length 48. Note the shape of sequence_trimmed, which is 215 

subsequences of 48 points each with 1 dimension at each point (clearly you only have 

scaled_value as a column at each time stamp).

Figure 6-25.  Code to create subsequences

Chapter 6   Long Short-term memory modeLS 




234

Now, let’s train your model for 20 epochs, using the training set as the validation 

data. You can do so as follows. Figure 

6-26


 shows the code to train the model.

Figure 6-26.  Code to train the model

Chapter 6   Long Short-term memory modeLS 




235

Figure 


6-27

 shows the plotting of the loss during the training process through the 

epochs of training.


Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   149   150   151   152   153   154   155   156   ...   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