Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/02/20 15:53:52 (5 years ago)
Author:
dpiringe
Message:

#3026:

  • Runner now uses SymbolicDataAnalysisExpressionMATLABFormatter to save instances of ISymbolicRegressionSolution
  • refactored user controls for detail view of json items, now they do not inherit from JsonItemBaseControl -> JsonItemBaseControl uses now an extra control
    • this change was made for fluid repositioning of controls (e.g. when no ActualName is present)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Runner.cs

    r17453 r17464  
    88using HeuristicLab.Optimization;
    99using HeuristicLab.ParallelEngine;
     10using HeuristicLab.Problems.DataAnalysis.Symbolic;
     11using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
    1012using HeuristicLab.SequentialEngine;
    1113using Newtonsoft.Json.Linq;
     
    3941        obj.Add("Run", JToken.FromObject(run.ToString()));
    4042        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          }
    4351        }
    4452      }
Note: See TracChangeset for help on using the changeset viewer.