A binary classifier experiment

Solved!
Posted in General by andrewcz Tue Mar 08 2016 01:24:59 GMT+0000 (UTC)·5·Viewed 1,740 times

Hi, Fantastic Library, so clear! I was just wondering, i am trying to use the library for a binary classifier experiment using the log loss function to train the model. This is for a university experiment around benchmarking different models. Would you have some time to provide an example of how to use the library to achieve the above goal. Many thanks, Best, Andrew
andrewcz
Mar 8, 2016

*To the above- the log loss error function.

Markus Beissinger
Mar 8, 2016

Sure thing! You want to use the binary cross-entropy loss (log loss for binary case) located here:
opendeep.optimization.loss.binary_crossentropy.py

Similar to the first steps tutorial, you pass your classifier output as the 'inputs' parameter to the loss, and the target theano variable to represent the labels in the dataset as the 'targets' parameter.

Let me know if this helps or you have follow up questions!

Markus Beissinger
Mar 8, 2016

You can import the loss with the statement:
from opendeep.optimization.loss import BinaryCrossentropy

andrewcz
Mar 8, 2016

Thanks Markus!!
I will give it a try with my base dataset.
Will give you update when i have trained the model :).

Best,
Andrew


Markus Beissinger marked this as solved
Markdown is allowed