SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Static Public Member Functions
cross_entropy< Backend::EIGEN3, Matrix > Struct Template Reference

Detailed Description

template<>
struct shogun::linalg::implementation::special_purpose::cross_entropy< Backend::EIGEN3, Matrix >

Specialization of cross_entropy for the Eigen3 backend

Definition at line 440 of file implementation/SpecialPurpose.h.

Public Types

typedef Matrix::Scalar T
typedef Eigen::Matrix< T,
Eigen::Dynamic, Eigen::Dynamic > 
MatrixXt

Static Public Member Functions

static T compute (SGMatrix< T > P, SGMatrix< T > Q)

Member Typedef Documentation

typedef Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> MatrixXt

Eigen matrix type

Definition at line 446 of file implementation/SpecialPurpose.h.

typedef Matrix::Scalar T

Scalar type

Definition at line 443 of file implementation/SpecialPurpose.h.

Member Function Documentation

static T compute ( SGMatrix< T P,
SGMatrix< T Q 
)
static

Returns the cross entropy between P and Q. The cross entropy is defined as \( H(P,Q) = - \sum_{ij} P[i,j]log(Q[i,j]) \)

Definition at line 451 of file implementation/SpecialPurpose.h.


The documentation for this struct was generated from the following file:

SHOGUN Machine Learning Toolbox - Documentation