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