- Timestamp:
- 07/25/18 19:17:27 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2904_CalculateImpacts/3.4/Implementation/Regression/RegressionSolutionVariableImpactsCalculator.cs
r16017 r16018 107 107 //mkommend: annoying name clash with static method, open to better naming suggestions 108 108 public IEnumerable<Tuple<string, double>> Calculate(IRegressionSolution solution) { 109 return CalculateImpacts(solution, DataPartition, ReplacementMethod);109 return CalculateImpacts(solution, ReplacementMethod, FactorReplacementMethod, DataPartition); 110 110 } 111 111 112 112 public static IEnumerable<Tuple<string, double>> CalculateImpacts( 113 113 IRegressionSolution solution, 114 DataPartitionEnum data = DataPartitionEnum.Training,115 114 ReplacementMethodEnum replacementMethod = ReplacementMethodEnum.Median, 116 115 FactorReplacementMethodEnum factorReplacementMethod = FactorReplacementMethodEnum.Best, 116 DataPartitionEnum data = DataPartitionEnum.Training, 117 117 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); 119 119 } 120 120 … … 123 123 IRegressionProblemData problemData, 124 124 IEnumerable<double> estimatedValues, 125 DataPartitionEnum data = DataPartitionEnum.Training,126 125 ReplacementMethodEnum replacementMethod = ReplacementMethodEnum.Median, 127 126 FactorReplacementMethodEnum factorReplacementMethod = FactorReplacementMethodEnum.Best, 127 DataPartitionEnum data = DataPartitionEnum.Training, 128 128 Func<double, string, bool> progressCallback = null) { 129 129 IEnumerable<int> rows; … … 184 184 IEnumerable<double> targetValues, 185 185 double originalValue, 186 DataPartitionEnum data = DataPartitionEnum.Training,187 186 ReplacementMethodEnum replacementMethod = ReplacementMethodEnum.Median, 188 FactorReplacementMethodEnum factorReplacementMethod = FactorReplacementMethodEnum.Best) { 187 FactorReplacementMethodEnum factorReplacementMethod = FactorReplacementMethodEnum.Best, 188 DataPartitionEnum data = DataPartitionEnum.Training) { 189 189 return CalculateImpact(variableName, solution.Model, solution.ProblemData.Dataset, rows, targetValues, originalValue, replacementMethod, factorReplacementMethod); 190 190 }
Note: See TracChangeset
for help on using the changeset viewer.