00001 /*************************************************************************** 00002 * @file gnn_cross_entropy.h 00003 * @brief Cross Entropy Error Criterion. 00004 * 00005 * @date : 25-08-03 23:20 00006 * @author : Pedro Ortega C. <peortega@dcc.uchile.cl> 00007 * Copyright 2003 Pedro Ortega C. 00008 ****************************************************************************/ 00009 /* 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Library General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00023 */ 00024 00025 #ifndef _GNN_CROSS_ENTROPY_H_ 00026 #define _GNN_CROSS_ENTROPY_H_ 00027 00028 /******************************************/ 00029 /* Include Files */ 00030 /******************************************/ 00031 00032 #include "gnn_criterion.h" 00033 00034 00035 00036 /******************************************/ 00037 /* Macros and Definitions */ 00038 /******************************************/ 00039 00040 /** 00041 * @brief Minimum value to be evaluated in a logarithm. 00042 * @ingroup gnn_cross_entropy_doc 00043 * 00044 * The evaluation of the cross entropy criterion has some tricky parts. 00045 * Whenever the natural logarithm of a very small quantity is to be taken, 00046 * then this value sets the limit. 00047 */ 00048 #define GNN_CROSS_ENTROPY_EPS 0.0001 00049 00050 00051 00052 /******************************************/ 00053 /* Public Interface */ 00054 /******************************************/ 00055 00056 gnn_criterion * 00057 gnn_cross_entropy_new (size_t size); 00058 00059 00060 #endif /* _GNN_CROSS_ENTROPY_H_ */ 00061 00062 00063
1.2.18