Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16018 for branches


Ignore:
Timestamp:
07/25/18 19:17:27 (6 years ago)
Author:
fholzing
Message:

#2904: Unified order of IFixedValueParameter. Use FactorReplacementMethod as default for .Calculate method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2904_CalculateImpacts/3.4/Implementation/Regression/RegressionSolutionVariableImpactsCalculator.cs

    r16017 r16018  
    107107    //mkommend: annoying name clash with static method, open to better naming suggestions
    108108    public IEnumerable<Tuple<string, double>> Calculate(IRegressionSolution solution) {
    109       return CalculateImpacts(solution, DataPartition, ReplacementMethod);
     109      return CalculateImpacts(solution, ReplacementMethod, FactorReplacementMethod, DataPartition);
    110110    }
    111111
    112112    public static IEnumerable<Tuple<string, double>> CalculateImpacts(
    113113      IRegressionSolution solution,
    114       DataPartitionEnum data = DataPartitionEnum.Training,
    115114      ReplacementMethodEnum replacementMethod = ReplacementMethodEnum.Median,
    116115      FactorReplacementMethodEnum factorReplacementMethod = FactorReplacementMethodEnum.Best,
     116      DataPartitionEnum data = DataPartitionEnum.Training,
    117117      Func<double, string, bool> progressCallback = null) {
    118       return CalculateImpacts(solution.Model, solution.ProblemData, solution.EstimatedValues, data, replacementMethod, factorReplacementMethod, progressCallback);
     118      return CalculateImpacts(solution.Model, solution.ProblemData, solution.EstimatedValues, replacementMethod, factorReplacementMethod, data, progressCallback);
    119119    }
    120120
     
    123123      IRegressionProblemData problemData,
    124124      IEnumerable<double> estimatedValues,
    125       DataPartitionEnum data = DataPartitionEnum.Training,
    126125      ReplacementMethodEnum replacementMethod = ReplacementMethodEnum.Median,
    127126      FactorReplacementMethodEnum factorReplacementMethod = FactorReplacementMethodEnum.Best,
     127      DataPartitionEnum data = DataPartitionEnum.Training,
    128128      Func<double, string, bool> progressCallback = null) {
    129129      IEnumerable<int> rows;
     
    184184      IEnumerable<double> targetValues,
    185185      double originalValue,
    186       DataPartitionEnum data = DataPartitionEnum.Training,
    187186      ReplacementMethodEnum replacementMethod = ReplacementMethodEnum.Median,
    188       FactorReplacementMethodEnum factorReplacementMethod = FactorReplacementMethodEnum.Best) {
     187      FactorReplacementMethodEnum factorReplacementMethod = FactorReplacementMethodEnum.Best,
     188      DataPartitionEnum data = DataPartitionEnum.Training) {
    189189      return CalculateImpact(variableName, solution.Model, solution.ProblemData.Dataset, rows, targetValues, originalValue, replacementMethod, factorReplacementMethod);
    190190    }
Note: See TracChangeset for help on using the changeset viewer.