Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/12/17 14:11:43 (7 years ago)
Author:
pkimmesw
Message:

#2665 Fixed bias 0 issue, PushExpressionFrequencyAnalyzer, Fixed probability for ERC settings, Fixed enable/disable instructions, Added expression descriptions

Location:
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/DataTypes.cs

    r14897 r15032  
    33
    44  [Flags]
    5   public enum DataTypes : ushort {
     5  public enum DataTypes {
    66    None = 0x01, // Required to specify expression dependencies
    77    Integer = 0x02,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/NumberIo.cs

    r15017 r15032  
    2424        WorstResult = 400,
    2525        InputArgumentTypes = new[] { ExampleArgumentType.Float, ExampleArgumentType.Integer },
    26         OutputArgumentTypes = new[] { ExampleArgumentType.Print },
     26        OutputArgumentTypes = new[] { ExampleArgumentType.Float },
    2727        TrainingCount = 25,
    2828        TestCount = 1000,
    29         EnabledDataTypes = DataTypes.Integer | DataTypes.Float | DataTypes.Print,
     29        EnabledDataTypes = DataTypes.Integer | DataTypes.Float, // | DataTypes.Print,
    3030        EvalLimit = 200,
    3131        MaxSize = 200,
     
    4747        InputFloat = ExampleArgumentConverter.ConvertDoubles(input[0]),
    4848        InputInteger = ExampleArgumentConverter.ConvertIntegers(input[1]),
    49         //OutputFloat = new[] { estimedFloatValue },
    50         OutputPrint = estimedFloatValue.ToString("R", CultureInfo.InvariantCulture),
     49        OutputFloat = ExampleArgumentConverter.ConvertDoubles(output),
     50        //OutputPrint = estimedFloatValue.ToString("R", CultureInfo.InvariantCulture),
    5151      };
    5252    }
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Views/DataEditorView.cs

    r14952 r15032  
    188188          var type = Content.InputArgumentTypes[i];
    189189          var offset = inputArgumentCountDict[type];
    190           row.Cells[i].Value = ViewHelper.StringifyInput(type, offset, example, ValueSeparator);
     190          row.Cells[i].Value = ViewHelper.StringifyInput(type, offset, "R", example, ValueSeparator);
    191191          inputArgumentCountDict[type]++;
    192192        }
     
    196196          var type = Content.OutputArgumentTypes[i];
    197197          var offset = outputArgumentCountDict[type];
    198           row.Cells[Content.InputArgumentTypes.Length + i].Value = ViewHelper.StringifyOutput(type, offset, example, ValueSeparator);
     198          row.Cells[Content.InputArgumentTypes.Length + i].Value = ViewHelper.StringifyOutput(type, offset, "R", example, ValueSeparator);
    199199          outputArgumentCountDict[type]++;
    200200        }
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Views/ViewHelper.cs

    r14952 r15032  
    66
    77  public static class ViewHelper {
    8     public static string StringifyInput(ExampleArgumentType type, int offset, Example example, string valueSeparator) {
     8    public static string StringifyInput(ExampleArgumentType type, int offset, string floatFormat, Example example, string valueSeparator) {
    99      switch (type) {
    1010        case ExampleArgumentType.Integer: return example.InputInteger[offset].ToString();
    1111        case ExampleArgumentType.IntegerVector: return "[" + string.Join(", ", example.InputIntegerVector[offset]) + "]";
    1212
    13         case ExampleArgumentType.Float: return example.InputFloat[offset].ToString(CultureInfo.CurrentUICulture);
    14         case ExampleArgumentType.FloatVector: return "[" + string.Join(", ", example.InputFloatVector[offset]) + "]";
     13        case ExampleArgumentType.Float: return example.InputFloat[offset].ToString(floatFormat, CultureInfo.CurrentUICulture);
     14        case ExampleArgumentType.FloatVector: return "[" + string.Join(", ", example.InputFloatVector[offset].Select(x => x.ToString(floatFormat, CultureInfo.InvariantCulture))) + "]";
    1515
    1616        case ExampleArgumentType.Boolean: return example.InputBoolean[offset].ToString();
     
    2424    }
    2525
    26     public static string StringifyOutput(ExampleArgumentType type, int offset, Example example, string valueSeparator) {
     26    public static string StringifyOutput(ExampleArgumentType type, int offset, string floatFormat, Example example, string valueSeparator) {
    2727      switch (type) {
    2828        case ExampleArgumentType.Integer: return example.OutputInteger[offset].ToString();
    2929        case ExampleArgumentType.IntegerVector: return "[" + string.Join(", ", example.OutputIntegerVector[offset]) + "]";
    3030
    31         case ExampleArgumentType.Float: return example.OutputFloat[offset].ToString(CultureInfo.CurrentUICulture);
    32         case ExampleArgumentType.FloatVector: return "[" + string.Join(", ", example.OutputFloatVector[offset]) + "]";
     31        case ExampleArgumentType.Float: return example.OutputFloat[offset].ToString(floatFormat, CultureInfo.InvariantCulture);
     32        case ExampleArgumentType.FloatVector: return "[" + string.Join(", ", example.OutputFloatVector[offset].Select(x => x.ToString(floatFormat, CultureInfo.InvariantCulture))) + "]";
    3333
    3434        case ExampleArgumentType.Boolean: return example.OutputBoolean[offset].ToString();
Note: See TracChangeset for help on using the changeset viewer.