Beginning Anomaly Detection Using



Download 26,57 Mb.
Pdf ko'rish
bet269/283
Sana12.07.2021
Hajmi26,57 Mb.
#116397
1   ...   265   266   267   268   269   270   271   272   ...   283
Bog'liq
Beginning Anomaly Detection Using Python-Based Deep Learning

 Loss  Functions

 MSE

torch.nn.MSELoss()

If you have questions on the notation for this equation, refer to Chapter 

3

. The 



equation is shown in Figure 

B-28


.

Given input 



θ, the weights, the formula finds the average difference squared between 

the predicted value and the actual value. The parameter h



θ

 represents the model with the 

weight parameter 

θ passed in, so h

θ

(x



i

) would give the predicted value for x



i

 with model’s 

weights 

θ. The parameter y

i

 represents the actual prediction for the data point at index i. 

Lastly, there are n entries in total.

This function has several parameters (two are deprecated):

• 

size_average: (Deprecated in favor of reduction.) The losses are 

averaged over each loss element in the batch by default (True). If 

set to False, then the losses are summed for each minibatch instead. 

Default = True.

appendix B   intro to pytorch



388

• 

reduce: (Deprecated in favor of reduction.) The losses are averaged 

or summed over observations for each minibatch depending on 

size_average by default (True). If set to False, then it returns a loss per 

batch element and ignores size_average. Default = True.

• 

reduction: A string value to specify the type of reduction to be done. 

Choose between ‘none’, ‘elementwise_mean’, or ‘sum’. ‘none’ means 

no reduction is applied, ‘elementwise_mean’ will divide the sum of 

the output by the number of elements in the output, and ‘sum’ will 

just sum the output. Default = ’elementwise_mean’. Note: specifying 

either size_average or reduce will override this parameter.

This loss metric can be used in autoencoders to help evaluate the difference between 

the reconstructed output and the original. In the case of anomaly detection, this metric 

can be used to separate the anomalies from the normal data points, since anomalies 

have a higher reconstruction error.


Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   265   266   267   268   269   270   271   272   ...   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