abstractmodel.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Robot Group Leipzig * 00003 * martius@informatik.uni-leipzig.de * 00004 * fhesse@informatik.uni-leipzig.de * 00005 * der@informatik.uni-leipzig.de * 00006 * * 00007 * This program is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation; either version 2 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 * This program is distributed in the hope that it will be useful, * 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00015 * GNU General Public License for more details. * 00016 * * 00017 * You should have received a copy of the GNU General Public License * 00018 * along with this program; if not, write to the * 00019 * Free Software Foundation, Inc., * 00020 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00021 *************************************************************************** 00022 * * 00023 * DESCRIPTION * 00024 * * 00025 * $Log: abstractmodel.h,v $ 00026 * Revision 1.2 2006/07/27 15:27:20 martius 00027 * processing should be called before learning 00028 * 00029 * Revision 1.1 2006/07/20 17:14:34 martius 00030 * removed std namespace from matrix.h 00031 * storable interface 00032 * abstract model and invertablemodel as superclasses for networks 00033 * 00034 * 00035 * * 00036 ***************************************************************************/ 00037 #ifndef __ABSTRACTMODEL_H 00038 #define __ABSTRACTMODEL_H 00039 00040 #include "matrix.h" 00041 #include "configurable.h" 00042 #include "storeable.h" 00043 00044 /// abstract class (interface) for a model that can be used by a controller 00045 class AbstractModel : public Configurable, public Storeable { 00046 public: 00047 AbstractModel(){}; 00048 virtual ~AbstractModel(){}; 00049 00050 /** initialisation of the network with the given number of input and output units 00051 @param inputDim length of input vector 00052 @param outputDim length of output vector 00053 @param unit_map if 0 the parametes are choosen randomly. 00054 Otherwise the model is initialised to represent a unit_map with the given response strength. 00055 */ 00056 virtual void init(unsigned int inputDim, unsigned int outputDim, double unit_map = 0.0) = 0; 00057 00058 /** passive processing of the input 00059 (this function is not constant since a recurrent network for example might change internal states 00060 */ 00061 virtual const matrix::Matrix process (const matrix::Matrix& input) = 0; 00062 00063 /* performs learning and returns the network output before learning 00064 learnRateFactor can be given to modify eps for this learning step 00065 (process should be called before) 00066 */ 00067 virtual const matrix::Matrix learn (const matrix::Matrix& input, 00068 const matrix::Matrix& nom_output, 00069 double learnRateFactor = 1) = 0; 00070 00071 /// returns the number of input neurons 00072 virtual unsigned int getInputDim() const = 0; 00073 /// returns the number of output neurons 00074 virtual unsigned int getOutputDim() const = 0; 00075 00076 }; 00077 00078 00079 #endif

Generated on Tue Jan 16 02:14:34 2007 for Robotsystem of the Robot Group Leipzig by doxygen 1.3.8