Customise your algorithm by creating the function to be optimised

Why read this article?

In this article and the youtube video above we will recall the basic concepts of the loss function and cost function, we will then see how to create a custom loss function in tensorflow with the Keras API and subclassing the base class “Loss” of Keras. We will then see how to create an example loss, in this case, a customised Accuracy for regression problems. I remind you to follow my Medium profile to support this work. You can find all the other articles in this series on my profile and all the other videos in the series on my YouTube channel. You can also find all the scripts in the git repository.

Loss Function

In mathematical optimization, statistics, machine learning and Deep Learning the Loss Function (also known as Cost Function or Error Function) is a function that defines a correlation between a series of values and a real number. That number represents conceptually the cost associated with an event or a set of values. In general, the goal of an optimization procedure is to minimize the loss function.

Photo by Volkan Olmez on Unsplash

Continue reading:—-7f60cf5620c9—4