Keraflow
Deep Learning for Python.
 All Classes Namespaces Functions Pages
keraflow.objectives Namespace Reference

Built-in objectives functions. More...

Functions

def accuracy
 Accuracy objective. More...
 
def square_error
 Squared error loss.
 
def absolute_error
 Absolute error loss.
 
def absolute_percentage_error
 Absolute percentage error loss.
 
def squared_logarithmic_error
 Squared log error loss.
 
def hinge
 Squared hinge error loss.
 
def squared_hinge
 Squared hinge error loss.
 
def binary_crossentropy
 Crossentropy loss for binary labels. More...
 
def categorical_crossentropy
 Crossentropy loss for multiple-class classification. More...
 
def kullback_leibler_divergence
 Information gain from a predicted probability distribution Q to a true probability distribution P. More...
 
def poisson
 Poisson loss.
 
def cosine_proximity
 Cosine proximity loss.
 

Detailed Description

Built-in objectives functions.

All objectives should accept two 2D (or more) tensors y_pred & y_true and return the resulting 2D (or more) tensor containg objective score per sample.

Function Documentation

def keraflow.objectives.accuracy (   y_pred,
  y_true 
)

Accuracy objective.

Note that this objective is a switch of binary_accuracy and categorical_accuracy.

def keraflow.objectives.binary_crossentropy (   y_pred,
  y_true 
)

Crossentropy loss for binary labels.

Shape of y_pred and y_true should be (N,1), where N is the sample size.

def keraflow.objectives.categorical_crossentropy (   y_pred,
  y_true 
)

Crossentropy loss for multiple-class classification.

y_pred and y_true should be binary matrix of shape (N,c), where N is the sample size, c is the number of class.

def keraflow.objectives.kullback_leibler_divergence (   y_pred,
  y_true 
)

Information gain from a predicted probability distribution Q to a true probability distribution P.

Gives a measure of difference between both distributions.