Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2393


Ignore:
Timestamp:
09/27/09 17:27:57 (15 years ago)
Author:
gkronber
Message:

Fixed #765 (GP Predictor should output NaN if the predicted value for a row can't be calculated).

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HL3TreeEvaluator.cs

    r2328 r2393  
    3838        case EvaluatorSymbolTable.VARIABLE: {
    3939            int row = sampleIndex + currInstr.i_arg1;
    40             if (row < 0 || row >= dataset.Rows) throw new InvalidOperationException("Out of range access to dataset row: " + row);
     40            if (row < 0 || row >= dataset.Rows) throw new ArgumentException("Out of range access to dataset row: " + row);
    4141            else return currInstr.d_arg0 * dataset.GetValue(row, currInstr.i_arg0);
    4242          }
     
    4646        case EvaluatorSymbolTable.DIFFERENTIAL: {
    4747            int row = sampleIndex + currInstr.i_arg1;
    48             if (row < 0 || row >= dataset.Rows) throw new InvalidOperationException("Out of range access to dataset row: " + row);
     48            if (row < 0 || row >= dataset.Rows) throw new ArgumentException("Out of range access to dataset row: " + row);
    4949            else if (row < 1) return 0.0;
    5050            else {
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Predictor.cs

    r2381 r2393  
    5454      double[] result = new double[end - start];
    5555      for (int i = 0; i < result.Length; i++) {
    56         result[i] = treeEvaluator.Evaluate(i + start);
     56        try {
     57          result[i] = treeEvaluator.Evaluate(i + start);
     58        }
     59        catch (ArgumentException) {
     60          result[i] = double.NaN;
     61        }
    5762      }
    5863      return result;
     
    6368      foreach (IFunctionTree ft in FunctionTreeIterator.IteratePrefix(functionTree.FunctionTree)) {
    6469        if (ft is VariableFunctionTree) {
    65           VariableFunctionTree variable = (VariableFunctionTree) ft;
     70          VariableFunctionTree variable = (VariableFunctionTree)ft;
    6671          inputVariables.Add(variable.VariableName);
    6772        }
  • trunk/sources/HeuristicLab.sln

    r2367 r2393  
    2525EndProject
    2626Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.CEDMA.Charting-3.3", "HeuristicLab.CEDMA.Charting\3.3\HeuristicLab.CEDMA.Charting-3.3.csproj", "{1BF17271-5350-476A-8F6D-FC74FA3E82CA}"
    27 EndProject
    28 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.CEDMA.Core-3.3", "HeuristicLab.CEDMA.Core\3.3\HeuristicLab.CEDMA.Core-3.3.csproj", "{C27DDF6C-84DF-45EF-B82F-57A28DD51166}"
    2927EndProject
    3028Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.CEDMA.Server-3.3", "HeuristicLab.CEDMA.Server\3.3\HeuristicLab.CEDMA.Server-3.3.csproj", "{F05D261A-4F7D-46C9-AB9C-21FD4566D719}"
     
    530528    {1BF17271-5350-476A-8F6D-FC74FA3E82CA}.Visualization Debug|x86.ActiveCfg = Debug|x86
    531529    {1BF17271-5350-476A-8F6D-FC74FA3E82CA}.Visualization Debug|x86.Build.0 = Debug|x86
    532     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.CEDMA Debug|Any CPU.ActiveCfg = Debug|Any CPU
    533     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.CEDMA Debug|Any CPU.Build.0 = Debug|Any CPU
    534     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.CEDMA Debug|x64.ActiveCfg = Debug|x64
    535     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.CEDMA Debug|x64.Build.0 = Debug|x64
    536     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.CEDMA Debug|x86.ActiveCfg = Debug|x86
    537     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.CEDMA Debug|x86.Build.0 = Debug|x86
    538     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    539     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Debug|Any CPU.Build.0 = Debug|Any CPU
    540     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Debug|x64.ActiveCfg = Debug|x64
    541     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Debug|x64.Build.0 = Debug|x64
    542     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Debug|x86.ActiveCfg = Debug|x86
    543     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Debug|x86.Build.0 = Debug|x86
    544     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Modeling Debug|Any CPU.ActiveCfg = Debug|Any CPU
    545     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Modeling Debug|Any CPU.Build.0 = Debug|Any CPU
    546     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Modeling Debug|x64.ActiveCfg = Debug|x64
    547     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Modeling Debug|x86.ActiveCfg = Debug|x86
    548     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Release|Any CPU.ActiveCfg = Release|Any CPU
    549     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Release|Any CPU.Build.0 = Release|Any CPU
    550     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Release|x64.ActiveCfg = Release|x64
    551     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Release|x64.Build.0 = Release|x64
    552     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Release|x86.ActiveCfg = Release|x86
    553     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Release|x86.Build.0 = Release|x86
    554     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.v3.2 Debug|Any CPU.ActiveCfg = Debug|Any CPU
    555     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.v3.2 Debug|Any CPU.Build.0 = Debug|Any CPU
    556     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.v3.2 Debug|x64.ActiveCfg = Debug|x64
    557     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.v3.2 Debug|x64.Build.0 = Debug|x64
    558     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.v3.2 Debug|x86.ActiveCfg = Debug|x86
    559     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.v3.2 Debug|x86.Build.0 = Debug|x86
    560     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Visualization Debug|Any CPU.ActiveCfg = Debug|Any CPU
    561     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Visualization Debug|Any CPU.Build.0 = Debug|Any CPU
    562     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Visualization Debug|x64.ActiveCfg = Debug|x64
    563     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Visualization Debug|x64.Build.0 = Debug|x64
    564     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Visualization Debug|x86.ActiveCfg = Debug|x86
    565     {C27DDF6C-84DF-45EF-B82F-57A28DD51166}.Visualization Debug|x86.Build.0 = Debug|x86
    566530    {F05D261A-4F7D-46C9-AB9C-21FD4566D719}.CEDMA Debug|Any CPU.ActiveCfg = Debug|Any CPU
    567531    {F05D261A-4F7D-46C9-AB9C-21FD4566D719}.CEDMA Debug|Any CPU.Build.0 = Debug|Any CPU
     
    40684032    {6D9564BB-956D-4808-8F92-AA7F776F90A5} = {410732DB-725A-4824-896B-C298978343C0}
    40694033    {1BF17271-5350-476A-8F6D-FC74FA3E82CA} = {410732DB-725A-4824-896B-C298978343C0}
    4070     {C27DDF6C-84DF-45EF-B82F-57A28DD51166} = {410732DB-725A-4824-896B-C298978343C0}
    40714034    {F05D261A-4F7D-46C9-AB9C-21FD4566D719} = {410732DB-725A-4824-896B-C298978343C0}
    40724035    {B462D3CC-8866-42F0-9832-AD0967613B72} = {410732DB-725A-4824-896B-C298978343C0}
Note: See TracChangeset for help on using the changeset viewer.