Exemple #1
0
 private void x457a4b5397851b17()
 {
     AnalystSegregateTarget[] targetArray;
     if (!this._x613f2248b9e460bd)
     {
         AnalystSegregateTarget[] targetArray2 = new AnalystSegregateTarget[0];
         if (-2 != 0)
         {
             this._x594135906c55045c.Segregate.SegregateTargets = targetArray2;
             return;
         }
     }
     else
     {
         targetArray = new AnalystSegregateTarget[] { new AnalystSegregateTarget("FILE_TRAIN", 0x4b), new AnalystSegregateTarget("FILE_EVAL", 0x19) };
     }
     this._x594135906c55045c.Segregate.SegregateTargets = targetArray;
 }
Exemple #2
0
        /// <summary>
        ///     Handle loading segregation info.
        /// </summary>
        /// <param name="section">The section being loaded.</param>
        private void HandleSegregateFiles(EncogFileSection section)
        {
            IList<AnalystSegregateTarget> nfs = new List<AnalystSegregateTarget>();
            bool first = true;

            foreach (String line in section.Lines)
            {
                if (!first)
                {
                    IList<String> cols = EncogFileSection.SplitColumns(line);
                    String filename = cols[0];
                    int percent = Int32.Parse(cols[1]);

                    var nf = new AnalystSegregateTarget(
                        filename, percent);
                    nfs.Add(nf);
                }
                else
                {
                    first = false;
                }
            }

            var array = new AnalystSegregateTarget[nfs.Count];
            for (int i = 0; i < array.Length; i++)
            {
                array[i] = nfs[i];
            }

            _script.Segregate.SegregateTargets = array;
        }
 /// <summary>
 ///     Generate the segregate task.
 /// </summary>
 private void GenerateSegregate()
 {
     if (_taskSegregate)
     {
         var array = new AnalystSegregateTarget[2];
         array[0] = new AnalystSegregateTarget(FileTrain,
                                               DefaultTrainPercent);
         array[1] = new AnalystSegregateTarget(FileEval,
                                               DefaultEvalPercent);
         _script.Segregate.SegregateTargets = array;
     }
     else
     {
         var array = new AnalystSegregateTarget[0];
         _script.Segregate.SegregateTargets = array;
     }
 }
Exemple #4
0
 private void x3ed9c05d3bbdec37(EncogFileSection xb32f8dd719a105db)
 {
     bool flag;
     AnalystSegregateTarget[] targetArray;
     IList<AnalystSegregateTarget> list = new List<AnalystSegregateTarget>();
     Label_003D:
     flag = true;
     if (-1 != 0)
     {
     }
     using (IEnumerator<string> enumerator = xb32f8dd719a105db.Lines.GetEnumerator())
     {
         string str;
         IList<string> list2;
         AnalystSegregateTarget target;
     Label_0055:
         if (enumerator.MoveNext())
         {
             goto Label_00A0;
         }
         goto Label_00C0;
     Label_0060:
         flag = false;
         goto Label_0055;
     Label_0064:
         list.Add(target);
         goto Label_0055;
     Label_006E:
         list2 = EncogFileSection.SplitColumns(str);
         string theFile = list2[0];
         if (-2 == 0)
         {
             goto Label_0060;
         }
         int thePercent = int.Parse(list2[1]);
         target = new AnalystSegregateTarget(theFile, thePercent);
         goto Label_0064;
     Label_00A0:
         str = enumerator.Current;
         if (!flag && (0 == 0))
         {
             goto Label_006E;
         }
         goto Label_0060;
     }
     Label_00C0:
     targetArray = new AnalystSegregateTarget[list.Count];
     int index = 0;
     if ((((uint) flag) | 0xff) != 0)
     {
         while (index < targetArray.Length)
         {
             targetArray[index] = list[index];
             index++;
         }
         this._x594135906c55045c.Segregate.SegregateTargets = targetArray;
         if (0 != 0)
         {
             goto Label_003D;
         }
     }
 }