itkBatchSupervisedTrainingFunction.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkBatchSupervisedTrainingFunction_h
00018 #define __itkBatchSupervisedTrainingFunction_h
00019
00020 #include "itkTrainingFunctionBase.h"
00021
00022 namespace itk
00023 {
00024 namespace Statistics
00025 {
00026
00027 template<class TSample, class TTargetVector, class ScalarType>
00028 class BatchSupervisedTrainingFunction : public TrainingFunctionBase<TSample, TTargetVector, ScalarType>
00029 {
00030 public:
00031
00032 typedef BatchSupervisedTrainingFunction Self;
00033 typedef TrainingFunctionBase<TSample, TTargetVector, ScalarType>
00034 Superclass;
00035 typedef SmartPointer<Self> Pointer;
00036 typedef SmartPointer<const Self> ConstPointer;
00037
00039 itkTypeMacro(BatchSupervisedTrainingFunction, TrainingFunctionBase);
00040
00042 itkNewMacro(Self);
00043
00044 typedef typename Superclass::NetworkType NetworkType;
00045 typedef typename Superclass::InternalVectorType InternalVectorType;
00046
00048 void SetNumOfIterations(long i);
00049
00050 virtual void Train(NetworkType* net, TSample* samples, TTargetVector* targets);
00051
00052 itkSetMacro(Threshold, ScalarType);
00053
00054 protected:
00055
00056 BatchSupervisedTrainingFunction();
00057 virtual ~BatchSupervisedTrainingFunction(){};
00058
00060 virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00061
00062 ScalarType m_Threshold;
00063 bool m_Stop;
00064 };
00065
00066 }
00067 }
00068
00069 #ifndef ITK_MANUAL_INSTANTIATION
00070 #include "itkBatchSupervisedTrainingFunction.txx"
00071 #endif
00072
00073 #endif
00074