/// <summary> /// Add a task. /// </summary> public void AddTask(AnalystTask task) { _tasks[task.Name] = task; }
/// <summary> /// Generate the tasks. /// </summary> private void GenerateTasks() { var task1 = new AnalystTask(EncogAnalyst.TaskFull); if (!_timeSeries && _taskRandomize) { task1.Lines.Add("randomize"); } if (!_timeSeries && _taskBalance) { task1.Lines.Add("balance"); } if (_taskSegregate) { task1.Lines.Add("segregate"); } if (_taskNormalize) { task1.Lines.Add("normalize"); } task1.Lines.Add("generate"); task1.Lines.Add("create"); task1.Lines.Add("train"); task1.Lines.Add("evaluate"); if (_codeTargetLanguage != TargetLanguage.NoGeneration) { task1.Lines.Add("code"); } var task2 = new AnalystTask("task-generate"); if (!_timeSeries && _taskRandomize) { task2.Lines.Add("randomize"); } if (_taskSegregate) { task2.Lines.Add("segregate"); } if (_taskNormalize) { task2.Lines.Add("normalize"); } task2.Lines.Add("generate"); var task3 = new AnalystTask("task-evaluate-raw"); task3.Lines.Add(CreateSet(ScriptProperties.MlConfigEvalFile, FileEvalNorm)); task3.Lines.Add(CreateSet(ScriptProperties.NormalizeConfigSourceFile, FileEval)); task3.Lines.Add(CreateSet(ScriptProperties.NormalizeConfigTargetFile, FileEvalNorm)); task3.Lines.Add("normalize"); task3.Lines.Add("evaluate-raw"); var task4 = new AnalystTask("task-create"); task4.Lines.Add("create"); var task5 = new AnalystTask("task-train"); task5.Lines.Add("train"); var task6 = new AnalystTask("task-evaluate"); task6.Lines.Add("evaluate"); var task7 = new AnalystTask("task-cluster"); task7.Lines.Add("cluster"); var task8 = new AnalystTask("task-code"); task8.Lines.Add("code"); AnalystTask task9 = null; if (_preprocess) { task9 = new AnalystTask("task-preprocess"); task9.Lines.Add("process"); } _script.AddTask(task1); _script.AddTask(task2); _script.AddTask(task3); _script.AddTask(task4); _script.AddTask(task5); _script.AddTask(task6); _script.AddTask(task7); _script.AddTask(task8); if (task9 != null) { _script.AddTask(task9); } }
private void x8623f9a426a3d24c() { AnalystTask task2; AnalystTask task3; AnalystTask task4; AnalystTask task5; AnalystTask task6; AnalystTask task7; AnalystTask task = new AnalystTask("task-full"); goto Label_033C; Label_0010: this._x594135906c55045c.AddTask(task5); Label_001D: this._x594135906c55045c.AddTask(task6); this._x594135906c55045c.AddTask(task7); if (0xff != 0) { return; } goto Label_00FB; Label_0046: this._x594135906c55045c.AddTask(task3); if (2 == 0) { goto Label_001D; } Label_0059: this._x594135906c55045c.AddTask(task4); if (0 == 0) { goto Label_0010; } if (3 != 0) { goto Label_00BF; } Label_0072: this._x594135906c55045c.AddTask(task2); if (0 == 0) { goto Label_0046; } Label_00BF: task5 = new AnalystTask("task-train"); task5.Lines.Add("train"); task6 = new AnalystTask("task-evaluate"); task6.Lines.Add("evaluate"); task7 = new AnalystTask("task-cluster") { Lines = { "cluster" } }; this._x594135906c55045c.AddTask(task); if (-2147483648 != 0) { goto Label_0072; } goto Label_0046; Label_00FB: task4 = new AnalystTask("task-create"); if (0 != 0) { goto Label_0046; } task4.Lines.Add("create"); if (0 == 0) { goto Label_00BF; } goto Label_0010; Label_016F: task2.Lines.Add("generate"); task3 = new AnalystTask("task-evaluate-raw") { Lines = { xe1c0f6103254de7f("ML:CONFIG_evalFile", "FILE_EVAL_NORM"), xe1c0f6103254de7f("NORMALIZE:CONFIG_sourceFile", "FILE_EVAL") } }; task3.Lines.Add(xe1c0f6103254de7f("NORMALIZE:CONFIG_targetFile", "FILE_EVAL_NORM")); task3.Lines.Add("normalize"); task3.Lines.Add("evaluate-raw"); goto Label_00FB; Label_01CE: if (this._x613f2248b9e460bd) { task2.Lines.Add("segregate"); } if (this._x7047063a9bee4054) { task2.Lines.Add("normalize"); if (0 != 0) { goto Label_00FB; } if (0 == 0) { goto Label_016F; } if (0 == 0) { goto Label_0223; } } else { goto Label_016F; } Label_0207: task2.Lines.Add("randomize"); goto Label_01CE; Label_0223: task2 = new AnalystTask("task-generate"); if (!this._x02283b983d652139) { if (this._x62451326f700d5c8) { goto Label_0207; } if (0 != 0) { goto Label_0307; } } goto Label_01CE; Label_0292: if (this._x7047063a9bee4054) { task.Lines.Add("normalize"); } else if (2 == 0) { goto Label_0072; } task.Lines.Add("generate"); task.Lines.Add("create"); task.Lines.Add("train"); if (2 == 0) { goto Label_0311; } task.Lines.Add("evaluate"); if (15 == 0) { goto Label_0059; } if (8 != 0) { goto Label_0223; } goto Label_033C; Label_02C5: if (this._x613f2248b9e460bd) { task.Lines.Add("segregate"); } goto Label_0292; Label_0307: if (this._x02283b983d652139) { goto Label_02C5; } Label_0311: if (!this._xc24b506a94383a44) { if (8 == 0) { goto Label_0307; } if (0 != 0) { goto Label_0292; } } else { task.Lines.Add("balance"); } goto Label_02C5; Label_033C: if (this._x02283b983d652139) { goto Label_0307; } if (!this._x62451326f700d5c8) { if (0 == 0) { goto Label_0307; } } else { task.Lines.Add("randomize"); } if (0 == 0) { goto Label_0307; } goto Label_033C; }
/// <summary> /// Execute a task. /// </summary> /// /// <param name="task">The task to execute.</param> public void ExecuteTask(AnalystTask task) { int total = task.Lines.Count; int current = 1; foreach (String line in task.Lines) { EncogLogging.Log(EncogLogging.LevelDebug, "Execute analyst line: " + line); ReportCommandBegin(total, current, line); bool canceled = false; String command; String args; String line2 = line.Trim(); int index = line2.IndexOf(' '); if (index != -1) { command = line2.Substring(0, (index) - (0)).ToUpper(); args = line2.Substring(index + 1); } else { command = line2.ToUpper(); args = ""; } Cmd cmd = _commands[command]; if (cmd != null) { canceled = cmd.ExecuteCommand(args); } else { throw new AnalystError("Unknown Command: " + line); } ReportCommandEnd(canceled); CurrentQuantTask = null; current++; if (ShouldStopAll()) { break; } } }
/// <summary> /// Handle loading a task. /// </summary> /// <param name="section">The section.</param> private void HandleTask(EncogFileSection section) { var task = new AnalystTask(section.SubSectionName); foreach (String line in section.Lines) { task.Lines.Add(line); } _script.AddTask(task); }
public void ExecuteTask(AnalystTask task) { int count = task.Lines.Count; int num2 = 1; using (IEnumerator<string> enumerator = task.Lines.GetEnumerator()) { string str; bool flag; string str2; string str3; string str4; int num3; Cmd cmd; goto Label_0023; Label_001D: num2++; goto Label_0034; Label_0023: if (enumerator.MoveNext()) { goto Label_0129; } return; Label_0034: if (!this.x1855cef31496f82f()) { goto Label_0023; } goto Label_0122; Label_003E: this.x7946863605ccf4d8(flag); this.CurrentQuantTask = null; goto Label_001D; Label_0050: cmd = this._xc8e5edc888efe6f5[str2]; if (cmd != null) { flag = cmd.ExecuteCommand(str3); goto Label_003E; } throw new AnalystError("Unknown Command: " + str); Label_009A: str2 = str4.ToUpper(); str3 = ""; goto Label_0050; Label_00AE: if (num3 != -1) { goto Label_00D7; } if (0 == 0) { goto Label_009A; } goto Label_0122; Label_00BD: if ((((uint) flag) + ((uint) num3)) > uint.MaxValue) { goto Label_0129; } goto Label_00AE; Label_00D7: str2 = str4.Substring(0, num3).ToUpper(); str3 = str4.Substring(num3 + 1); goto Label_0050; Label_00F9: flag = false; if (((uint) num3) > uint.MaxValue) { goto Label_0131; } str4 = str.Trim(); Label_0115: num3 = str4.IndexOf(' '); goto Label_00BD; Label_0122: if (4 != 0) { return; } Label_0129: str = enumerator.Current; Label_0131: EncogLogging.Log(0, "Execute analyst line: " + str); this.x1ce1584ce46d7cf9(count, num2, str); if (((uint) num3) < 0) { goto Label_0115; } goto Label_00F9; } }
public void AddTask(AnalystTask task) { this._xa4ef4a3fe0a24a84[task.Name] = task; }
private void x5e3dc7f2e4f7d693(EncogFileSection xb32f8dd719a105db) { AnalystTask task = new AnalystTask(xb32f8dd719a105db.SubSectionName); foreach (string str in xb32f8dd719a105db.Lines) { task.Lines.Add(str); } this._x594135906c55045c.AddTask(task); }