Beginning Anomaly Detection Using



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

one-hot encoding) is what categorical cross 

entropy uses. For sparse categorical cross entropy, it suffices to simply pass in the 

information in Figure 

A-21


.

Figure A-21.  The y_train to pass in for sparse categorical cross entropy

Figure A-22.  An example of y_train in the code that can be passed in if sparse 

categorical cross entropy is the metric

Figure A-20.  Converting y_train into a one-hot encoded format in Jupyter

Or the code shown in Figure 

A-22

.

 Metrics



 Binary  Accuracy

keras.metrics.binary_accuracy(y_true, y_pred)

To use this function, the ‘accuracy’ must be a metric that’s passed into the model.

compile() function, and binary cross entropy must be the loss function.

Appendix A   intro to KerAs



344

Essentially, the function finds the number of instances where the true class label 

matches the rounded prediction label and finds the mean of the result (which is the 

same thing as dividing the total number of correct matches by the total number of 

samples).

The predicted values are rounded since as the neural network is trained more and 

more, the output values tend to change so that the predicted value is something really 

close to one, and the rest of the value are something really close to zero. In order to 

match the predicted values to the original truth labels (which are all integers), you can 

simply round the predicted values.

In the official Keras documentation on GitHub, this function is defined as shown in 

Figure 


A-23

.

Figure A-23.  The code definition in the Keras GitHub page of binary accuracy




Download 26,57 Mb.

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