Beginning Anomaly Detection Using


Anomaly Detection with the Dilated TCN



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

 Anomaly Detection with the Dilated TCN

Now that you know more about what a TCN is and how it works, let’s try applying a 

dilated TCN to the credit card dataset.

First, import all of the necessary packages (see Figure 

7-18a

).

Input Layer



Hidden Layer 1

Hidden Layer 2

Output Layer

Figure 7-17.  A causal dilated network. The first hidden layer has a dilation factor 

of two, and the second hidden layer has a dilation factor of four. Notice how no 

inputs forward in the sequence contribute to the next layer’s node. This type of 

structure is ideal if the goal is to preserve some sort of flow within the data set

which is time in our case

Chapter 7   temporal Convolutional networks




268

Then, you must create a class for the visualization of confusion matrix, etc.  

(see Figure 

7-18b


).

Figure 7-18a.  Importing all of the necessary packages in order to start your code

Chapter 7   temporal Convolutional networks




269

After that, proceed to importing your data set and processing it (see Figure 

7-19

).

Figure 7-18b.  Creating a visualization class



df = pd.read_csv("datasets/creditcardfraud/creditcard.csv", 

sep=",", index_col=None)

print

(df.shape)



df.head()

Figure 7-19.  Importing your data set and displaying the first five entries

Chapter 7   temporal Convolutional networks




270

The output should look somewhat like Figure 

7-20

.

The data frame continues in Figure 



7-21

.

Each entry is noticeably large, with 31 columns per entry. If you check the tail end of 



the data frame in Figure 

7-22


,


Download 26,57 Mb.

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