Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/09/16 15:34:33 (8 years ago)
Author:
gkronber
Message:

#2650 added new symbol FactorVariable (renamed previous symbol to BinaryFactorVariable)
Work in progress.

Location:
branches/symbreg-factors-2650
Files:
2 added
18 edited

Legend:

Unmodified
Added
Removed
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SolutionComparisonView.cs

    r14241 r14249  
    6666      var usedFactorVariables =
    6767        symbolicSolution.Model.SymbolicExpressionTree.IterateNodesPostfix()
    68         .OfType<FactorVariableTreeNode>()
     68        .OfType<BinaryFactorVariableTreeNode>()
    6969        .Select(node => Tuple.Create(node.VariableName, node.VariableValue))
    7070        .Distinct();
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs

    r14238 r14249  
    6060      var usedFactorVariables =
    6161        Content.Model.SymbolicExpressionTree.IterateNodesPostfix()
    62         .OfType<FactorVariableTreeNode>()
     62        .OfType<BinaryFactorVariableTreeNode>()
    6363        .Select(node => Tuple.Create(node.VariableName, node.VariableValue))
    6464        .Distinct();
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs

    r14243 r14249  
    205205          ConstantTreeNode constantTreeNode = node as ConstantTreeNode;
    206206          VariableTreeNode variableTreeNode = node as VariableTreeNode;
    207           BinaryFactorVariableTreeNode factorVariableTreeNode = node as BinaryFactorVariableTreeNode;
     207          BinaryFactorVariableTreeNode binFactorVarTreeNode = node as BinaryFactorVariableTreeNode;
     208          FactorVariableTreeNode factorVarTreeNode = node as FactorVariableTreeNode;
    208209          if (constantTreeNode != null)
    209210            c[i++] = constantTreeNode.Value;
    210211          else if (updateVariableWeights && variableTreeNode != null)
    211212            c[i++] = variableTreeNode.Weight;
    212           else if (updateVariableWeights && factorVariableTreeNode != null)
    213             c[i++] = factorVariableTreeNode.Weight;
     213          else if (updateVariableWeights && binFactorVarTreeNode != null)
     214            c[i++] = binFactorVarTreeNode.Weight;
     215          else if (factorVarTreeNode != null) {
     216            foreach (var w in factorVarTreeNode.Weights) c[i++] = w;
     217          }
    214218        }
    215219      }
     
    248252        alglib.lsfitfit(state, function_cx_1_func, function_cx_1_grad, null, null);
    249253        alglib.lsfitresults(state, out info, out c, out rep);
    250       }
    251       catch (ArithmeticException) {
     254      } catch (ArithmeticException) {
    252255        return originalQuality;
    253       }
    254       catch (alglib.alglibexception) {
     256      } catch (alglib.alglibexception) {
    255257        return originalQuality;
    256258      }
     
    273275        ConstantTreeNode constantTreeNode = node as ConstantTreeNode;
    274276        VariableTreeNode variableTreeNode = node as VariableTreeNode;
    275         BinaryFactorVariableTreeNode factorVarTreeNode = node as BinaryFactorVariableTreeNode;
     277        BinaryFactorVariableTreeNode binFactorVarTreeNode = node as BinaryFactorVariableTreeNode;
     278        FactorVariableTreeNode factorVarTreeNode = node as FactorVariableTreeNode;
    276279        if (constantTreeNode != null)
    277280          constantTreeNode.Value = constants[i++];
    278281        else if (updateVariableWeights && variableTreeNode != null)
    279282          variableTreeNode.Weight = constants[i++];
    280         else if (updateVariableWeights && factorVarTreeNode != null)
    281           factorVarTreeNode.Weight = constants[i++];
     283        else if (updateVariableWeights && binFactorVarTreeNode != null)
     284          binFactorVarTreeNode.Weight = constants[i++];
     285        else if (factorVarTreeNode != null) {
     286          foreach (var w in factorVarTreeNode.Weights) constants[i++] = w;
     287        }
    282288      }
    283289    }
     
    321327          term = par;
    322328        }
     329        return true;
     330      }
     331      if (node.Symbol is FactorVariable) {
     332        var factorVarNode = node as FactorVariableTreeNode;
     333        var products = new List<Term>();
     334        foreach (var variableValue in factorVarNode.Symbol.GetVariableValues(factorVarNode.VariableName)) {
     335          var par = new AutoDiff.Variable();
     336          parameters.Add(par);
     337          variableNames.Add(factorVarNode.VariableName);
     338          categoricalVariableValues.Add(variableValue);
     339
     340          var wVar = new AutoDiff.Variable();
     341          variables.Add(wVar);
     342
     343          products.Add(AutoDiff.TermBuilder.Product(wVar, par));
     344        }
     345        term = AutoDiff.TermBuilder.Sum(products);
    323346        return true;
    324347      }
     
    494517         !(n.Symbol is Variable) &&
    495518         !(n.Symbol is BinaryFactorVariable) &&
     519         !(n.Symbol is FactorVariable) &&
    496520         !(n.Symbol is Constant) &&
    497521         !(n.Symbol is Addition) &&
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs

    r14243 r14249  
    5353      constant.MaxValue = 20;
    5454      var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
    55       var factorVariableSymbol = new BinaryFactorVariable();
     55      var binFactorVariableSymbol = new BinaryFactorVariable();
     56      var factorVariableSymbol = new FactorVariable();
    5657
    57       var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, variableSymbol, factorVariableSymbol };
     58      var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, variableSymbol, binFactorVariableSymbol, factorVariableSymbol};
    5859      var functionSymbols = new List<Symbol>() { add, sub, mul, div };
    5960
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs

    r14243 r14249  
    115115      constant.MaxValue = 20;
    116116      var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
    117       var factorVariable = new BinaryFactorVariable();
     117      var binFactorVariable = new BinaryFactorVariable();
     118      var factorVariable = new FactorVariable();
    118119      var laggedVariable = new LaggedVariable();
    119120      laggedVariable.InitialFrequency = 0.0;
     
    124125      var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, square, pow, sqrt, root, exp,
    125126        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral,
    126         @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };
     127        @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };
    127128      var unaryFunctionSymbols = new List<Symbol>() { square, sqrt, sin, cos, tan, log, exp, not, timeLag, integral, derivative,
    128129        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral
     
    131132      var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, variableCondition };
    132133      var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor };
    133       var terminalSymbols = new List<Symbol>() { variableSymbol, factorVariable, constant, laggedVariable, autoregressiveVariable };
     134      var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, laggedVariable, autoregressiveVariable };
    134135
    135136      foreach (var symb in allSymbols)
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs

    r14243 r14249  
    104104      constant.MaxValue = 20;
    105105      var variableSymbol = new Variable();
    106       var factorVariable = new BinaryFactorVariable();
     106      var binFactorVariable = new BinaryFactorVariable();
     107      var factorVariable = new FactorVariable();
    107108      var laggedVariable = new LaggedVariable();
    108109      var autoregressiveVariable = new AutoregressiveTargetVariable();
     
    115116      var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi,
    116117        fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral});
    117       var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, factorVariable });
     118      var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable });
    118119      var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols });
    119120
     
    123124      var comparisonSymbols = new GroupSymbol(ComparisonsName, new List<ISymbol> { gt, lt });
    124125      var booleanOperationSymbols = new GroupSymbol(BooleanOperatorsName, new List<ISymbol> { and, or, not, xor });
    125       var conditionalSymbols = new GroupSymbol(ConditionalSymbolsName, new List<ISymbol> { conditionSymbols, comparisonSymbols, booleanOperationSymbols }); // TODO: factorVariableBool?
     126      var conditionalSymbols = new GroupSymbol(ConditionalSymbolsName, new List<ISymbol> { conditionSymbols, comparisonSymbols, booleanOperationSymbols });
    126127
    127128      var timeSeriesSymbols = new GroupSymbol(TimeSeriesSymbolsName, new List<ISymbol> { timeLag, integral, derivative, laggedVariable, autoregressiveVariable });
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r14238 r14249  
    199199    <Compile Include="Symbols\AiryB.cs" />
    200200    <Compile Include="Symbols\Bessel.cs" />
     201    <Compile Include="Symbols\BinaryFactorVariable.cs" />
     202    <Compile Include="Symbols\BinaryFactorVariableTreeNode.cs" />
     203    <Compile Include="Symbols\FactorVariableTreeNode.cs" />
    201204    <Compile Include="Symbols\FactorVariable.cs" />
    202     <Compile Include="Symbols\FactorVariableTreeNode.cs" />
    203205    <Compile Include="Symbols\VariableBase.cs" />
    204206    <Compile Include="Symbols\VariableTreeNodeBase.cs" />
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs

    r14243 r14249  
    8484    public const byte Bessel = 44;
    8585    public const byte FactorVariable = 46;
     86    public const byte BinaryFactorVariable = 47;
     87
    8688
    8789    private static Dictionary<Type, byte> symbolToOpcode = new Dictionary<Type, byte>() {
     
    132134      { typeof(Erf), OpCodes.Erf},
    133135      { typeof(Bessel), OpCodes.Bessel},
    134       { typeof(BinaryFactorVariable), OpCodes.FactorVariable }
     136      { typeof(FactorVariable), OpCodes.FactorVariable },
     137      { typeof(BinaryFactorVariable), OpCodes.BinaryFactorVariable }
    135138    };
    136139
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs

    r14243 r14249  
    6666    private static MethodInfo erf = thisType.GetMethod("Erf", new Type[] { typeof(double) });
    6767    private static MethodInfo bessel = thisType.GetMethod("Bessel", new Type[] { typeof(double) });
    68     private static MethodInfo string_eq = typeof(string).GetMethod("Equals", new Type[] {typeof(string)});
     68    private static MethodInfo string_eq = typeof(string).GetMethod("Equals", new Type[] { typeof(string) });
    6969    #endregion
    7070
     
    628628            return;
    629629          }
    630         case OpCodes.FactorVariable: {
    631             BinaryFactorVariableTreeNode varNode = currentInstr.dynamicNode as BinaryFactorVariableTreeNode;
    632             il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array
    633             il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.data);
    634             // load correct column of the current variable
    635             il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);
    636             il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // rowIndex
    637             if (!state.InLaggedContext) {
    638               il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue);
    639               il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.VariableValue);
    640               il.Emit(System.Reflection.Emit.OpCodes.Call, string_eq);
    641               throw new NotSupportedException();
    642               // TODO: convert bool to 1 / 0?
    643             } else {
    644               var nanResult = il.DefineLabel();
    645               var normalResult = il.DefineLabel();
    646               il.Emit(System.Reflection.Emit.OpCodes.Dup);
    647               il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0);
    648               il.Emit(System.Reflection.Emit.OpCodes.Blt, nanResult);
    649               il.Emit(System.Reflection.Emit.OpCodes.Dup);
    650               il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, ds.Rows);
    651               il.Emit(System.Reflection.Emit.OpCodes.Bge, nanResult);
    652               il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue);
    653               il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.VariableValue);
    654               il.Emit(System.Reflection.Emit.OpCodes.Call, string_eq);
    655               throw new NotSupportedException();
    656               // TODO: convert bool to 1 / 0?
    657               il.Emit(System.Reflection.Emit.OpCodes.Br, normalResult);
    658               il.MarkLabel(nanResult);
    659               il.Emit(System.Reflection.Emit.OpCodes.Pop); // rowIndex
    660               il.Emit(System.Reflection.Emit.OpCodes.Pop); // column reference
    661               il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, double.NaN);
    662               il.MarkLabel(normalResult);
    663             }
    664             return;
     630        case OpCodes.FactorVariable:
     631        case OpCodes.BinaryFactorVariable: {
     632            throw new NotSupportedException();
    665633          }
    666634        case OpCodes.LagVariable: {
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs

    r14243 r14249  
    146146        } else if (instr.opCode == OpCodes.FactorVariable) {
    147147          var factorTreeNode = instr.dynamicNode as BinaryFactorVariableTreeNode;
    148           instr.data = dataset.GetReadOnlyStringValues(factorTreeNode.VariableName); 
     148          instr.data = dataset.GetReadOnlyStringValues(factorTreeNode.VariableName);
    149149        } else if (instr.opCode == OpCodes.LagVariable) {
    150150          var laggedVariableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode;
     
    459459            return ((IList<double>)currentInstr.data)[row] * variableTreeNode.Weight;
    460460          }
    461         case OpCodes.FactorVariable: {
     461        case OpCodes.BinaryFactorVariable: {
    462462            if (row < 0 || row >= dataset.Rows) return double.NaN;
    463463            var factorVarTreeNode = currentInstr.dynamicNode as BinaryFactorVariableTreeNode;
    464464            return ((IList<string>)currentInstr.data)[row] == factorVarTreeNode.VariableValue ? factorVarTreeNode.Weight : 0;
     465          }
     466        case OpCodes.FactorVariable: {
     467            if (row < 0 || row >= dataset.Rows) return double.NaN;
     468            var factorVarTreeNode = currentInstr.dynamicNode as FactorVariableTreeNode;
     469            return factorVarTreeNode.GetValue(((IList<string>)currentInstr.data)[row]);
    465470          }
    466471        case OpCodes.LagVariable: {
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs

    r14243 r14249  
    148148            instr.value = ((IList<double>)instr.data)[row] * variableTreeNode.Weight;
    149149          }
     150        } else if (instr.opCode == OpCodes.BinaryFactorVariable) {
     151          if (row < 0 || row >= dataset.Rows) instr.value = double.NaN;
     152          else {
     153            var factorTreeNode = instr.dynamicNode as BinaryFactorVariableTreeNode;
     154            instr.value = ((IList<string>)instr.data)[row] == factorTreeNode.VariableValue ? factorTreeNode.Weight : 0;
     155          }
    150156        } else if (instr.opCode == OpCodes.FactorVariable) {
    151157          if (row < 0 || row >= dataset.Rows) instr.value = double.NaN;
    152158          else {
    153             var factorTreeNode = instr.dynamicNode as BinaryFactorVariableTreeNode;
    154             instr.value = ((IList<string>)instr.data)[row] == factorTreeNode.VariableValue ? factorTreeNode.Weight : 0;
     159            var factorTreeNode = instr.dynamicNode as FactorVariableTreeNode;
     160            instr.value = factorTreeNode.GetValue(((IList<string>)instr.data)[row]);
    155161          }
    156162        } else if (instr.opCode == OpCodes.LagVariable) {
     
    398404            }
    399405            break;
     406          case OpCodes.BinaryFactorVariable: {
     407              var factorVariableTreeNode = instr.dynamicNode as BinaryFactorVariableTreeNode;
     408              instr.data = dataset.GetReadOnlyStringValues(factorVariableTreeNode.VariableName);
     409            }
     410            break;
    400411          case OpCodes.FactorVariable: {
    401               var factorVariableTreeNode = instr.dynamicNode as BinaryFactorVariableTreeNode;
     412              var factorVariableTreeNode = instr.dynamicNode as FactorVariableTreeNode;
    402413              instr.data = dataset.GetReadOnlyStringValues(factorVariableTreeNode.VariableName);
    403414            }
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs

    r14243 r14249  
    183183    }
    184184    private bool IsVariableBase(ISymbolicExpressionTreeNode node) {
    185       return node.Symbol is VariableBase;
     185      return node is VariableTreeNodeBase;
    186186    }
    187187    private bool IsConstant(ISymbolicExpressionTreeNode node) {
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs

    r14243 r14249  
    226226            .ToDictionary(varName => varName, varName => ds.GetStringValues(varName).Distinct().ToList());
    227227        }
     228      } foreach (var factorSymbol in grammar.Symbols.OfType<FactorVariable>()) {
     229        if (!factorSymbol.Fixed) {
     230          factorSymbol.AllVariableNames = problemData.InputVariables.Select(x => x.Value).Where(x => ds.VariableHasType<string>(x));
     231          factorSymbol.VariableNames = problemData.AllowedInputVariables.Where(x => ds.VariableHasType<string>(x));
     232          factorSymbol.VariableValues = factorSymbol.VariableNames
     233            .ToDictionary(varName => varName, varName => ds.GetStringValues(varName).Distinct().ToList());
     234        }
    228235      }
    229236    }
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSingleObjectiveProblem.cs

    r14185 r14249  
    7373    }
    7474
    75     public SymbolicDataAnalysisSingleObjectiveProblem(T problemData, U evaluator, V solutionCreator)
     75    protected SymbolicDataAnalysisSingleObjectiveProblem(T problemData, U evaluator, V solutionCreator)
    7676      : base(problemData, evaluator, solutionCreator) {
    7777      Parameters.Add(new FixedValueParameter<BoolValue>(MaximizationParameterName, "Set to false if the problem should be minimized."));
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs

    r14243 r14249  
    4343      //optimization: constant nodes return always the same value
    4444      ConstantTreeNode constantNode = node as ConstantTreeNode;
    45       BinaryFactorVariableTreeNode factorNode = node as BinaryFactorVariableTreeNode;
     45      BinaryFactorVariableTreeNode binaryFactorNode = node as BinaryFactorVariableTreeNode;
     46      FactorVariableTreeNode factorNode = node as FactorVariableTreeNode;
    4647      if (constantNode != null) {
    4748        yield return constantNode.Value;
    48       } else if (factorNode != null) {
     49      } else if (binaryFactorNode != null) {
    4950        // valid replacements are either all off or all on
    5051        yield return 0;
    5152        yield return 1;
     53      } else if (factorNode != null) {
     54        foreach (var w in factorNode.Weights) yield return w;
     55        yield return 0.0;
    5256      } else {
    5357        var rootSymbol = new ProgramRootSymbol().CreateTreeNode();
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariable.cs

    r14243 r14249  
    3232  public class BinaryFactorVariable : VariableBase {
    3333
    34     private Dictionary<string, List<string>> variableValues;
     34    private readonly Dictionary<string, List<string>> variableValues;
    3535
    3636    [Storable]
     
    6363
    6464    public override ISymbolicExpressionTreeNode CreateTreeNode() {
    65       return new FactorVariableTreeNode(this);
     65      return new BinaryFactorVariableTreeNode(this);
    6666    }
    6767
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariableTreeNode.cs

    r14243 r14249  
    4444      variableValue = original.variableValue;
    4545    }
    46     protected BinaryFactorVariableTreeNode() { }
    4746    public BinaryFactorVariableTreeNode(BinaryFactorVariable variableSymbol) : base(variableSymbol) { }
    4847
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionVariableImpactsCalculator.cs

    r14238 r14249  
    187187    }
    188188
    189     private static IEnumerable<double> EvaluateModelWithReplacedVariable(IRegressionModel model, string variable, ModifiableDataset dataset, IEnumerable<int> rows, IEnumerable<double> replacementValues) {
     189    private static IEnumerable<double> EvaluateModelWithReplacedVariable(IRegressionModel model, string variable,
     190      ModifiableDataset dataset, IEnumerable<int> rows, IEnumerable<double> replacementValues) {
    190191      var originalValues = dataset.GetReadOnlyDoubleValues(variable).ToList();
    191192      dataset.ReplaceVariable(variable, replacementValues.ToList());
     
    196197      return estimates;
    197198    }
    198     private static IEnumerable<double> EvaluateModelWithReplacedVariable(IRegressionModel model, string variable, ModifiableDataset dataset, IEnumerable<int> rows, IEnumerable<string> replacementValues) {
     199    private static IEnumerable<double> EvaluateModelWithReplacedVariable(IRegressionModel model, string variable,
     200      ModifiableDataset dataset, IEnumerable<int> rows, IEnumerable<string> replacementValues) {
    199201      var originalValues = dataset.GetReadOnlyStringValues(variable).ToList();
    200202      dataset.ReplaceVariable(variable, replacementValues.ToList());
Note: See TracChangeset for help on using the changeset viewer.