2
$\begingroup$

For logistic regression, the Cost function is defined as: \begin{equation} Cost(h_{\theta}(x)-y) = -ylog(h_{\theta}(x))-(1-y)log(1-h_{\theta}(x)) \end{equation}

I now have a nonlinear function \begin{equation} h_{\theta}^{(i)}(x)=xe^{-j\theta_i|x|^2} \end{equation} where $i$ denotes the $i$th training sample. How should I define cost function for this particular nonlinear function?

$\endgroup$
  • 1
    $\begingroup$ Hi Yifan. I might be able to answer this question later. Meanwhile, if you need immediate help, you might want to ask the question also on stats.stackexchange.com. $\endgroup$ – nbro May 29 at 23:13
  • $\begingroup$ Hi nbro, thank you very much for the suggestion~~ However I'll wait for your response~~ I'll ask there next time : ) $\endgroup$ – Yifan Liu May 30 at 8:37
  • $\begingroup$ Hi again~~ I would really like to ask if you could give me a hint on this problem~ Thank you so much $\endgroup$ – Yifan Liu Jun 7 at 9:57
  • $\begingroup$ Hi Yifan! I am sorry I only answer now. It had been a while since I had worked with logistic regression, so I needed some time to review it. Have a look at generalised linear models (link function and prediction/mean function). In the usual case of logistic regression, the link function is the logarithm of the odds ratio, that is, it is $\ln \left( \frac{p}{1 - p} \right)$, because the mean function is $\frac{1}{1 + e^{-x^T \beta}}$. In your case, you have a different mean function, which will correspond to some link function. $\endgroup$ – nbro Jun 7 at 10:44
  • $\begingroup$ Hi~~~ thank you so much for this. I'll have a deeper look into it and let you know~ Thank you so much for all the help! $\endgroup$ – Yifan Liu Jun 7 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.