Ignore:
Timestamp:
08/03/18 10:55:23 (3 years ago)
Author:
fholzing
Message:

#2904: Removed ElementAt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2904_CalculateImpacts/3.4/Implementation/Classification/ClassificationSolutionVariableImpactsCalculator.cs

    r16037 r16041  
    131131     ReplacementMethodEnum replacementMethod = ReplacementMethodEnum.Shuffle,
    132132     FactorReplacementMethodEnum factorReplacementMethod = FactorReplacementMethodEnum.Best) {
    133       //Calculate original quality-values (via calculator, default is Accuracy)
     133      //Calculate original quality-values (via calculator, default is Accuracy)   
    134134      OnlineCalculatorError error;
    135135      IEnumerable<double> targetValuesPartition = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
     
    144144
    145145      foreach (var inputVariable in allowedInputVariables) {
    146         impacts[inputVariable] = CalculateImpact(inputVariable, model, modifiableDataset, rows, targetValuesPartition, originalCalculatorValue, replacementMethod, factorReplacementMethod);
     146        if (model.VariablesUsedForPrediction.Contains(inputVariable)) {
     147          impacts[inputVariable] = CalculateImpact(inputVariable, model, modifiableDataset, rows, targetValuesPartition, originalCalculatorValue, replacementMethod, factorReplacementMethod);
     148        } else {
     149          impacts[inputVariable] = 0;
     150        }
    147151      }
    148152
Note: See TracChangeset for help on using the changeset viewer.