Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2387 for trunk


Ignore:
Timestamp:
09/24/09 13:24:40 (15 years ago)
Author:
mkommend
Message:

added GetModelingResultCalculator method to modeling result mapping (ticket #755)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Modeling/3.2/ModelingResultCalculators.cs

    r2386 r2387  
    104104      return ret.ToDictionary<KeyValuePair<ModelingResult, Func<double[,], double>>, ModelingResult, Func<double[,], double>>(x => x.Key, x => x.Value);
    105105    }
     106
     107    public static Func<double[,], double> GetModelingResultCalculator(ModelingResult modelingResult) {
     108      if (RegressionModelingResults.ContainsKey(modelingResult))
     109        return RegressionModelingResults[modelingResult];
     110      else if (ClassificationModelingResults.ContainsKey(modelingResult))
     111        return ClassificationModelingResults[modelingResult];
     112      else if (TimeSeriesPrognosisModelingResults.ContainsKey(modelingResult))
     113        return TimeSeriesPrognosisModelingResults[modelingResult];
     114      else
     115        throw new ArgumentException("Calculator for modeling reuslt " + modelingResult + " not defined.");
     116    }
    106117  }
    107118}
Note: See TracChangeset for help on using the changeset viewer.