- Timestamp:
- 03/02/20 15:53:52 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Runner.cs
r17453 r17464 8 8 using HeuristicLab.Optimization; 9 9 using HeuristicLab.ParallelEngine; 10 using HeuristicLab.Problems.DataAnalysis.Symbolic; 11 using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression; 10 12 using HeuristicLab.SequentialEngine; 11 13 using Newtonsoft.Json.Linq; … … 39 41 obj.Add("Run", JToken.FromObject(run.ToString())); 40 42 foreach (var res in run.Results) { 41 if (allowedResultNames.Contains(res.Key)) 42 obj.Add(res.Key, JToken.FromObject(res.Value.ToString())); 43 if (allowedResultNames.Contains(res.Key)) { 44 if (res.Value is ISymbolicRegressionSolution solution) { 45 var formatter = new SymbolicDataAnalysisExpressionMATLABFormatter(); 46 var x = formatter.Format(solution.Model.SymbolicExpressionTree); 47 obj.Add(res.Key, JToken.FromObject(x)); 48 } else 49 obj.Add(res.Key, JToken.FromObject(res.Value.ToString())); 50 } 43 51 } 44 52 }
Note: See TracChangeset
for help on using the changeset viewer.