- Timestamp:
- 05/26/20 09:39:14 (5 years ago)
- Location:
- branches/3026_IntegrationIntoSymSpace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Runner.cs
r17540 r17560 48 48 arr.Add(obj); 49 49 obj.Add("Run", JToken.FromObject(run.ToString())); 50 51 // add empty values for configured results 52 var emptyToken = JToken.FromObject(""); 53 foreach (var cr in configuredResults) { 54 obj.Add(cr, emptyToken); 55 } 56 57 // change empty values with calculated values 58 var formatter = new SymbolicDataAnalysisExpressionMATLABFormatter(); 50 59 foreach (var res in run.Results) { 51 if (configuredResults.Contains(res.Key)) {60 if(obj.ContainsKey(res.Key)) { 52 61 if (res.Value is ISymbolicRegressionSolution solution) { 53 var formatte r = new SymbolicDataAnalysisExpressionMATLABFormatter();54 var x = formatter.Format(solution.Model.SymbolicExpressionTree);55 obj.Add(res.Key, JToken.FromObject(x));56 } else57 obj.Add(res.Key, JToken.FromObject(res.Value.ToString()));62 var formattedModel = formatter.Format(solution.Model.SymbolicExpressionTree); 63 obj[res.Key] = JToken.FromObject(formattedModel); 64 } else { 65 obj[res.Key] = JToken.FromObject(res.Value.ToString()); 66 } 58 67 } 59 68 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/StringValueVM.cs
r17519 r17560 25 25 Item.ConcreteRestrictedItems = value; 26 26 //check if value is still in range 27 if (!Range. Any(x => x ==Value)) {27 if (!Range.Contains(Value)) { 28 28 Value = Range.FirstOrDefault(); 29 29 if (Range.Count() == 0) -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemValidValuesControl.cs
r17519 r17560 13 13 VM = vm; 14 14 if (VM.Item.ConcreteRestrictedItems != null) { 15 string tmp = VM.Value; 15 16 concreteItemsRestrictor.OnChecked += AddComboOption; 16 17 concreteItemsRestrictor.OnUnchecked += RemoveComboOption; 17 18 concreteItemsRestrictor.Init(VM.Item.ConcreteRestrictedItems); 19 VM.Value = tmp; 18 20 comboBoxValues.DataBindings.Add("SelectedItem", VM, nameof(StringValueVM.Value)); 19 21 } else { … … 51 53 } 52 54 VM.Range = items; 55 53 56 if (VM.Range.Count() <= 0) { 54 57 comboBoxValues.Enabled = false; -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/RegressionProblemDataConverter.cs
r17540 r17560 238 238 MaxValue = testPartition.End, 239 239 Minimum = 0, 240 Maximum = Math.Max(testPartition.End, trainingPartition.End)240 Maximum = int.MaxValue //Math.Max(testPartition.End, trainingPartition.End) 241 241 }; 242 242 } … … 251 251 MaxValue = trainingPartition.End, 252 252 Minimum = 0, 253 Maximum = Math.Max(testPartition.End, trainingPartition.End)253 Maximum = int.MaxValue //Math.Max(testPartition.End, trainingPartition.End) 254 254 }; 255 255 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonTemplateInstantiator.cs
r17519 r17560 65 65 // get algorithm root item 66 66 IJsonItem rootItem = Objects.First().Value; 67 67 68 //TODO validate 69 68 70 // inject configuration 69 71 JsonItemConverter.Inject(optimizer, rootItem);
Note: See TracChangeset
for help on using the changeset viewer.