Beginning Anomaly Detection Using



Download 26,57 Mb.
Pdf ko'rish
bet235/283
Sana12.07.2021
Hajmi26,57 Mb.
#116397
1   ...   231   232   233   234   235   236   237   238   ...   283
Bog'liq
Beginning Anomaly Detection Using Python-Based Deep Learning

Binary cross entropy 

is a special case of categorical cross entropy where the number of classes 



m is two.

Appendix A   intro to KerAs




342

 Sparse Categorical Cross Entropy

keras.losses.sparse_categorical_crossentropy(y_true, y_pred)

Sparse categorical cross entropy is basically the same as categorical cross entropy, 

but the distinction between them is in how their true labels are formatted. For 

categorical cross entropy, the labels are 

one-hot encoded. For an example of this, refer 

to Figure 

A-18

, if you had your y_train formatted originally as the following, with six 



maximum classes.

Figure A-18.  An example of how y_train can be formatted. The value in each 

index is the class value that corresponds to the value at that index in x_train

Figure A-19.  The y_train in Figure 

A-18

 is converted into a one-hot encoded 

format

You can call keras.utils.to_categorical(y_train, n_classes) with n_classes as 

6 to convert y_train to that shown in Figure 

A-19


.

So now your y_train looks like Figure 

A-20

.

Appendix A   intro to KerAs




343

This type of truth label formatting (




Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   231   232   233   234   235   236   237   238   ...   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