当前位置: 首页>>代码示例>>C#>>正文


C# IMLTrain类代码示例

本文整理汇总了C#中IMLTrain的典型用法代码示例。如果您正苦于以下问题:C# IMLTrain类的具体用法?C# IMLTrain怎么用?C# IMLTrain使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IMLTrain类属于命名空间,在下文中一共展示了IMLTrain类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Init

 public void Init(IMLTrain train_0)
 {
     this._xd87f6a9c53c2ed9f = train_0;
     this._x6947f9fc231e17e8 = (IMomentum) train_0;
     this._x6c7711ed04d2ac90 = false;
     this._x6947f9fc231e17e8.Momentum = 0.0;
     this._xd02ba004f6c6d639 = 0.0;
 }
开发者ID:neismit,项目名称:emds,代码行数:8,代码来源:SmartMomentum.cs

示例2: Init

 public void Init(IMLTrain train)
 {
     basicTrainSOM = train as BasicTrainSOM;
     if (basicTrainSOM == null)
     {
         throw new ArgumentException(
             String.Format("Argument shoud be of {0} type.", typeof(BasicTrainSOM)), "train");
     }
 }
开发者ID:marcin-mini-pw,项目名称:nnetwork_mini_pw,代码行数:9,代码来源:KohonenTrainStrategy.cs

示例3: Init

 public virtual void Init(IMLTrain train)
 {
     this._xd87f6a9c53c2ed9f = train;
     while (!(train.Method is IMLResettable))
     {
         throw new TrainingError("To use the reset strategy the machine learning method must support MLResettable.");
     }
     this._x1306445c04667cc7 = (IMLResettable) this._xd87f6a9c53c2ed9f.Method;
 }
开发者ID:neismit,项目名称:emds,代码行数:9,代码来源:ResetStrategy.cs

示例4: Init

 /// <summary>
 /// Initialize this strategy.
 /// </summary>
 ///
 /// <param name="train">The training algorithm.</param>
 public void Init(IMLTrain train)
 {
     _train = train;
     _ready = false;
     _setter = (ILearningRate) train;
     _trainingSize = train.Training.Count;
     _currentLearningRate = 1.0d/_trainingSize;
     EncogLogging.Log(EncogLogging.LevelDebug, "Starting learning rate: "
                                                + _currentLearningRate);
     _setter.LearningRate = _currentLearningRate;
 }
开发者ID:encog,项目名称:encog-silverlight-core,代码行数:16,代码来源:SmartLearningRate.cs

示例5: HybridStrategy

 public HybridStrategy(IMLTrain altTrain, double minImprovement, int tolerateMinImprovement, int alternateCycles)
 {
     if (((((uint) minImprovement) | 2) != 0) && (0 == 0))
     {
         this._xa45232be281da68a = altTrain;
         this._x6c7711ed04d2ac90 = false;
     }
     this._x123e81b4d1593407 = 0;
     this._x75deb38bfba59a18 = minImprovement;
     this._x671aa26bb37ef7df = tolerateMinImprovement;
     this._x2801df77d59cbd36 = alternateCycles;
 }
开发者ID:neismit,项目名称:emds,代码行数:12,代码来源:HybridStrategy.cs

示例6: CrossValidationKFold

        /// <summary>
        /// Construct a cross validation trainer.
        /// </summary>
        ///
        /// <param name="train">The training</param>
        /// <param name="k">The number of folds.</param>
        public CrossValidationKFold(IMLTrain train, int k) : base(train.Method, (FoldedDataSet) train.Training)
        {
            _train = train;
            Folded.Fold(k);

            _flatNetwork = ((BasicNetwork) train.Method).Structure.Flat;

            _networks = new NetworkFold[k];
            for (int i = 0; i < _networks.Length; i++)
            {
                _networks[i] = new NetworkFold(_flatNetwork);
            }
        }
开发者ID:jongh0,项目名称:MTree,代码行数:19,代码来源:CrossValidationKFold.cs

示例7: TestTraining

        public static void TestTraining(IMLTrain train, double requiredImprove)
        {
            train.Iteration();
            double error1 = train.Error;

            for (int i = 0; i < 10; i++)
                train.Iteration();

            double error2 = train.Error;

            double improve = (error1 - error2) / error1;
            Assert.IsTrue(improve >= requiredImprove,"Improve rate too low for " + train.GetType().Name +
                    ",Improve=" + improve + ",Needed=" + requiredImprove);
        }
开发者ID:Romiko,项目名称:encog-dotnet-core,代码行数:14,代码来源:NetworkUtil.cs

示例8: Init

        /// <summary>
        /// Initialize this strategy.
        /// </summary>
        ///
        /// <param name="train">The training algorithm.</param>
        public virtual void Init(IMLTrain train)
        {
            _train = train;
            _ready = false;

            if (!(train.Method is IMLEncodable))
            {
                throw new TrainingError(
                    "To make use of the Greedy strategy the machine learning method must support MLEncodable.");
            }

            _method = ((IMLEncodable) train.Method);
            _lastNetwork = new double[_method.EncodedArrayLength()];
        }
开发者ID:CreativelyMe,项目名称:encog-dotnet-core,代码行数:19,代码来源:Greedy.cs

示例9: Init

 public virtual void Init(IMLTrain train)
 {
     this._xd87f6a9c53c2ed9f = train;
     this._x6c7711ed04d2ac90 = false;
     while (!(train.Method is IMLEncodable))
     {
         throw new TrainingError("To make use of the Greedy strategy the machine learning method must support MLEncodable.");
     }
     do
     {
         this._x1306445c04667cc7 = (IMLEncodable) train.Method;
     }
     while (2 == 0);
     this._x8ca12f17f1ae2b01 = new double[this._x1306445c04667cc7.EncodedArrayLength()];
 }
开发者ID:neismit,项目名称:emds,代码行数:15,代码来源:Greedy.cs

示例10: Init

 public void Init(IMLTrain train)
 {
     this._xd87f6a9c53c2ed9f = train;
     while (true)
     {
         this._x6c7711ed04d2ac90 = false;
         this._x6947f9fc231e17e8 = (ILearningRate) train;
         this._x985befeef351542c = train.Training.Count;
         this._x6300a707dc67f3a2 = 1.0 / ((double) this._x985befeef351542c);
         EncogLogging.Log(0, "Starting learning rate: " + this._x6300a707dc67f3a2);
         do
         {
             this._x6947f9fc231e17e8.LearningRate = this._x6300a707dc67f3a2;
         }
         while (-2147483648 == 0);
         if (0 == 0)
         {
             return;
         }
     }
 }
开发者ID:neismit,项目名称:emds,代码行数:21,代码来源:SmartLearningRate.cs

示例11: CrossValidationKFold

 public CrossValidationKFold(IMLTrain train, int k)
     : base(train.Method, (FoldedDataSet) train.Training)
 {
     int num;
     if ((((uint) k) | 1) != 0)
     {
         this._xd87f6a9c53c2ed9f = train;
         base.Folded.Fold(k);
         goto Label_0083;
     }
     if (0xff != 0)
     {
         goto Label_0083;
     }
     Label_0039:
     num = 0;
     while (num < this._x5f6ed0047d99f4b6.Length)
     {
         this._x5f6ed0047d99f4b6[num] = new NetworkFold(this._xef94864849922d07);
         if (((uint) k) >= 0)
         {
         }
         num++;
     }
     if (((uint) num) <= uint.MaxValue)
     {
         return;
     }
     Label_0083:
     this._xef94864849922d07 = ((BasicNetwork) train.Method).Structure.Flat;
     this._x5f6ed0047d99f4b6 = new NetworkFold[k];
     if (8 == 0)
     {
         return;
     }
     goto Label_0039;
 }
开发者ID:neismit,项目名称:emds,代码行数:37,代码来源:CrossValidationKFold.cs

示例12: x0d87de1eb44df41c

 private void x0d87de1eb44df41c(IMLTrain xd87f6a9c53c2ed9f, IMLMethod x1306445c04667cc7, IMLDataSet x1c9e132f434262d8)
 {
     int maxIteration;
     ValidateNetwork.ValidateMethodToData(x1306445c04667cc7, x1c9e132f434262d8);
     double propertyDouble = base.Prop.GetPropertyDouble("ML:TRAIN_targetError");
     base.Analyst.ReportTrainingBegin();
     if ((((uint) maxIteration) & 0) == 0)
     {
         if (2 == 0)
         {
             goto Label_0038;
         }
         maxIteration = base.Analyst.MaxIteration;
         if (0xff != 0)
         {
             goto Label_0038;
         }
     }
     Label_001B:
     if (!xd87f6a9c53c2ed9f.TrainingDone && ((maxIteration == -1) || (xd87f6a9c53c2ed9f.IterationNumber < maxIteration)))
     {
         goto Label_0038;
     }
     Label_0023:
     xd87f6a9c53c2ed9f.FinishTraining();
     base.Analyst.ReportTrainingEnd();
     return;
     Label_0038:
     xd87f6a9c53c2ed9f.Iteration();
     base.Analyst.ReportTraining(xd87f6a9c53c2ed9f);
     if ((xd87f6a9c53c2ed9f.Error <= propertyDouble) || base.Analyst.ShouldStopCommand())
     {
         goto Label_0023;
     }
     goto Label_001B;
 }
开发者ID:neismit,项目名称:emds,代码行数:36,代码来源:CmdTrain.cs

示例13: PerformTraining

        /// <summary>
        ///     Perform the training.
        /// </summary>
        /// <param name="train">The training method.</param>
        /// <param name="method">The ML method.</param>
        /// <param name="trainingSet">The training set.</param>
        private void PerformTraining(IMLTrain train, IMLMethod method,
            IMLDataSet trainingSet)
        {
            ValidateNetwork.ValidateMethodToData(method, trainingSet);
            double targetError = Prop.GetPropertyDouble(
                ScriptProperties.MlTrainTargetError);
            Analyst.ReportTrainingBegin();
            int maxIteration = Analyst.MaxIteration;

            if (train.ImplementationType == TrainingImplementationType.OnePass)
            {
                train.Iteration();
                Analyst.ReportTraining(train);
            }
            else
            {
                do
                {
                    train.Iteration();
                    Analyst.ReportTraining(train);
                } while ((train.Error > targetError)
                         && !Analyst.ShouldStopCommand()
                         && !train.TrainingDone
                         && ((maxIteration == -1) || (train.IterationNumber < maxIteration)));
            }
            train.FinishTraining();

            Analyst.ReportTrainingEnd();
        }
开发者ID:kedrzu,项目名称:encog-dotnet-core,代码行数:35,代码来源:CmdTrain.cs

示例14: ReportTraining

 /// <summary>
 /// 
 /// </summary>
 ///
 public void ReportTraining(IMLTrain train)
 {
     Console.Out.WriteLine("Iteration #"
                           + Format.FormatInteger(train.IterationNumber)
                           + " Error:"
                           + Format.FormatPercent(train.Error)
                           + " elapsed time = "
                           + Format.FormatTimeSpan((int) (_stopwatch.ElapsedMilliseconds/Format.MiliInSec)));
 }
开发者ID:firestrand,项目名称:encog-dotnet-core,代码行数:13,代码来源:ConsoleAnalystListener.cs

示例15: Init

 /// <summary>
 /// Initialize this strategy.
 /// </summary>
 ///
 /// <param name="train_0">The training algorithm.</param>
 public void Init(IMLTrain train_0)
 {
     _train = train_0;
     _setter = (IMomentum) train_0;
     _ready = false;
     _setter.Momentum = 0.0d;
     _currentMomentum = 0;
 }
开发者ID:encog,项目名称:encog-silverlight-core,代码行数:13,代码来源:SmartMomentum.cs


注:本文中的IMLTrain类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。