예제 #1
0
        private void OnNetworkBuildProgressChanged(TNRNetBuilder.BuildProgress netBuildProgress)
        {
            //Prepare cluster version
            BuildProgress buildProgress = new BuildProgress(_clusterName,
                                                            Math.Min(_repetitionIdx + 1, _crossvalidationCfg.Repetitions),
                                                            _crossvalidationCfg.Repetitions,
                                                            Math.Min(_testingFoldIdx + 1, _numOfFoldsPerRepetition),
                                                            _numOfFoldsPerRepetition,
                                                            Math.Min(_netCfgIdx + 1, _clusterCfg.ClusterNetConfigurations.Count),
                                                            _clusterCfg.ClusterNetConfigurations.Count,
                                                            netBuildProgress
                                                            );

            //Raise event
            ClusterBuildProgressChanged?.Invoke(buildProgress);
            return;
        }
예제 #2
0
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="clusterName">Name of the cluster.</param>
 /// <param name="repetitionNum">The current folds processing repetition number.</param>
 /// <param name="maxNumOfRepetitions">The maximum number of folds processing repetitions.</param>
 /// <param name="foldNum">The current fold number within the folds processing repetition.</param>
 /// <param name="maxNumOfFolds">The maximum number of folds within the folds processing repetition.</param>
 /// <param name="netNum">The current network number within the current fold processing.</param>
 /// <param name="maxNumOfNets">The maximum number of networks within the current fold processing.</param>
 /// <param name="netBuildProgress">The holder of the network build progress information.</param>
 public BuildProgress(string clusterName,
                      int repetitionNum,
                      int maxNumOfRepetitions,
                      int foldNum,
                      int maxNumOfFolds,
                      int netNum,
                      int maxNumOfNets,
                      TNRNetBuilder.BuildProgress netBuildProgress
                      )
 {
     ClusterName         = clusterName;
     RepetitionsTracker  = new ProgressTracker((uint)maxNumOfRepetitions, (uint)repetitionNum);
     FoldsTracker        = new ProgressTracker((uint)maxNumOfFolds, (uint)foldNum);
     FoldNetworksTracker = new ProgressTracker((uint)maxNumOfNets, (uint)netNum);
     NetBuildProgress    = netBuildProgress;
     return;
 }