public void GetKeijzerInstanceTest() { var target = new KeijzerInstanceProvider(); StringBuilder erroneousInstances = new StringBuilder(); int count = 0; foreach (var id in target.GetDataDescriptors()) { try { target.LoadData(id); } catch (Exception ex) { erroneousInstances.AppendLine(id.Name + ": " + ex.Message); } count++; } Assert.IsTrue(count > 0, "No problem instances were found."); Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString()); }
private CSharpScript CreateGridSearchSVMRegressionScript() { var script = new CSharpScript { Name = ScriptItemName, Description = ScriptItemDescription }; #region Variables var provider = new KeijzerInstanceProvider(); var instance = (ArtificialRegressionDataDescriptor)provider.GetDataDescriptors().Single(x => x.Name == ProblemInstanceName); var data = instance.GenerateRegressionData(); script.VariableStore.Add(ProblemInstanceDataVaribleName, data); #endregion #region Code script.Code = ScriptSources.GridSearchSVMRegressionScriptSource; #endregion return(script); }