Ejemplo n.º 1
0
        /// <summary>
        /// 学習データを与えて初期化
        /// </summary>
		/// <param name="term_crit">学習アルゴリズムの終了条件.アルゴリズムにより何度繰り返されるか (逐次型の誤差逆伝播アルゴリズムでは,この数は学習データセットのサイズと掛け合わされる)と,1ターンで重みをどの程度変更するかを指定する.</param>
		/// <param name="train_method">用いる学習アルゴリズム</param>
		/// <param name="param1"></param>
		/// <param name="param2"></param>
#else
		/// <summary>
        /// Training constructor
        /// </summary>
		/// <param name="term_crit">The termination criteria for the training algorithm. It identifies how many iterations is done by the algorithm (for sequential backpropagation algorithm the number is multiplied by the size of the training set) and how much the weights could change between the iterations to make the algorithm continue. </param>
		/// <param name="train_method">The training algorithm to use</param>
		/// <param name="param1"></param>
		/// <param name="param2"></param>
#endif
		public CvANN_MLP_TrainParams(CvTermCriteria term_crit, MLPTrainingMethod train_method, double param1, double param2)
		{
            IntPtr p = MLInvoke.CvANN_MLP_TrainParams_construct(term_crit, (int)train_method, param1, param2);
            _data = (WCvANN_MLP_TrainParams)Marshal.PtrToStructure(p, typeof(WCvANN_MLP_TrainParams));
            MLInvoke.CvANN_MLP_TrainParams_destruct(p);
		}
Ejemplo n.º 2
0
        /// <summary>
        /// 学習データを与えて初期化
        /// </summary>
		/// <param name="termCrit">学習アルゴリズムの終了条件.アルゴリズムにより何度繰り返されるか (逐次型の誤差逆伝播アルゴリズムでは,この数は学習データセットのサイズと掛け合わされる)と,1ターンで重みをどの程度変更するかを指定する.</param>
		/// <param name="trainMethod">用いる学習アルゴリズム</param>
		/// <param name="param1"></param>
		/// <param name="param2"></param>
#else
        /// <summary>
        /// Training constructor
        /// </summary>
        /// <param name="termCrit">The termination criteria for the training algorithm. It identifies how many iterations is done by the algorithm (for sequential backpropagation algorithm the number is multiplied by the size of the training set) and how much the weights could change between the iterations to make the algorithm continue. </param>
        /// <param name="trainMethod">The training algorithm to use</param>
		/// <param name="param1"></param>
		/// <param name="param2"></param>
#endif
        public CvANN_MLP_TrainParams(TermCriteria termCrit, MLPTrainingMethod trainMethod, double param1, double param2 = 0)
		{
            NativeMethods.ml_ANN_MLP_TrainParams_new2(
                termCrit, (int)trainMethod, param1, param2, out data);
		}
Ejemplo n.º 3
0
        /// <summary>
        /// 学習データを与えて初期化
        /// </summary>
        /// <param name="termCrit">学習アルゴリズムの終了条件.アルゴリズムにより何度繰り返されるか (逐次型の誤差逆伝播アルゴリズムでは,この数は学習データセットのサイズと掛け合わされる)と,1ターンで重みをどの程度変更するかを指定する.</param>
        /// <param name="trainMethod">用いる学習アルゴリズム</param>
        /// <param name="param1"></param>
        /// <param name="param2"></param>
#else
        /// <summary>
        /// Training constructor
        /// </summary>
        /// <param name="termCrit">The termination criteria for the training algorithm. It identifies how many iterations is done by the algorithm (for sequential backpropagation algorithm the number is multiplied by the size of the training set) and how much the weights could change between the iterations to make the algorithm continue. </param>
        /// <param name="trainMethod">The training algorithm to use</param>
        /// <param name="param1"></param>
        /// <param name="param2"></param>
#endif
        public CvANN_MLP_TrainParams(TermCriteria termCrit, MLPTrainingMethod trainMethod, double param1, double param2 = 0)
        {
            NativeMethods.ml_ANN_MLP_TrainParams_new2(
                termCrit, (int)trainMethod, param1, param2, out data);
        }