<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Ask Ghassem - Recent questions tagged loss</title>
<link>https://ask.ghassem.com/tag/loss</link>
<description>Powered by Question2Answer</description>
<item>
<title>What loss function to use in CNN-SVM model</title>
<link>https://ask.ghassem.com/641/what-loss-function-to-use-in-cnn-svm-model</link>
<description>I am using Matlab R2018b and am trying to infuse SVM classifier within CNN. My plan is to use CNN only as a feature extractor and use SVM as the classifier. I know people have already implemented it a few years back either in tensorflow or in other platforms. In implementing this I got stuck at a point during backward propagation. I got puzzled about which loss function I need to implement to upgrade the gradients and the parameters.&lt;br /&gt;
&lt;br /&gt;
Few points came up during this:&lt;br /&gt;
&lt;br /&gt;
1. I got a feeling to implement the hinge loss here. But which form of hinge loss should I implement? Should I move on to the second form of hinge loss implementation for calculating loss during backward propagation?&lt;br /&gt;
&lt;br /&gt;
2. Besides, calculating the backward loss, should I calculate the forward loss as well to find out the loss occurred in the model?&lt;br /&gt;
&lt;br /&gt;
Any form of advice doing this CNN-svm infusion will be appreciated as I am unable to find any such material implemented in Matlab to get help.&lt;br /&gt;
&lt;br /&gt;
Thanks.</description>
<category>Deep Learning</category>
<guid isPermaLink="true">https://ask.ghassem.com/641/what-loss-function-to-use-in-cnn-svm-model</guid>
<pubDate>Sat, 08 Jun 2019 09:24:21 +0000</pubDate>
</item>
<item>
<title>How to calculate LogLoss in logistic regression?</title>
<link>https://ask.ghassem.com/588/how-to-calculate-logloss-in-logistic-regression</link>
<description>&lt;p&gt;The dataset of pass/fail in an exam for 5 students is given in the table below. If we use&amp;nbsp;&lt;strong&gt;Logistic Regression&lt;/strong&gt;&amp;nbsp;as the classifier and assume the model suggested by the optimizer will become the following for Odds of passing a course:&lt;/p&gt;

&lt;p&gt;$\log_e(Odds) = -64 + 2 \times hours$&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;&quot; height=&quot;203&quot; src=&quot;https://i.imgur.com/aVDAxTj.png&quot; width=&quot;300&quot;&gt;&lt;/p&gt;

&lt;p&gt;1) How to calculate&amp;nbsp;&lt;strong&gt;the loss of model&lt;/strong&gt;&amp;nbsp;for the student who studied 33 hours?&amp;nbsp;&lt;/p&gt;

&lt;p&gt;2) What is the &lt;strong&gt;total loss &lt;/strong&gt;of the model given in equation below?&amp;nbsp;&lt;/p&gt;

&lt;p&gt;$Logloss = -\frac{1}{N} \sum_{i=1}^N(y_i\log_e(p_i) + (1 - y_i)\log_e(1 - p_i))$&lt;/p&gt;</description>
<category>Machine Learning</category>
<guid isPermaLink="true">https://ask.ghassem.com/588/how-to-calculate-logloss-in-logistic-regression</guid>
<pubDate>Mon, 18 Mar 2019 20:34:40 +0000</pubDate>
</item>
</channel>
</rss>