- Timestamp:
- 02/28/20 10:43:50 (5 years ago)
- Location:
- branches/3040_VectorBasedGP
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP
- Property svn:mergeinfo changed
/trunk (added) merged: 17376-17378,17380,17384-17386,17402,17413,17421-17423,17426-17428,17430,17437,17441,17445,17450
- Property svn:mergeinfo changed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis (added) merged: 17422-17423
- Property svn:mergeinfo changed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis/3.4
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis/3.4 (added) merged: 17422-17423
- Property svn:mergeinfo changed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionVariableImpactsCalculator.cs
r17180 r17456 26 26 using System.Collections.Generic; 27 27 using System.Linq; 28 using HEAL.Attic; 28 29 using HeuristicLab.Common; 29 30 using HeuristicLab.Core; 30 31 using HeuristicLab.Data; 31 32 using HeuristicLab.Parameters; 32 using HEAL.Attic;33 33 using HeuristicLab.Random; 34 34 … … 173 173 174 174 IList originalValues = null; 175 IList replacementValues = GetReplacementValues(modifiableDataset, variableName, model, rows, targetValues, out originalValues, replacementMethod, factorReplacementMethod);176 177 double newValue = CalculateQualityForReplacement(model, modifiableDataset, variableName, originalValues, rows, replacementValues, targetValues);175 IList replacementValues = GetReplacementValues(modifiableDataset, variableName, model, problemData.AllowedInputVariables, rows, targetValues, out originalValues, replacementMethod, factorReplacementMethod); 176 177 double newValue = CalculateQualityForReplacement(model, modifiableDataset, problemData.AllowedInputVariables, variableName, originalValues, rows, replacementValues, targetValues); 178 178 double impact = quality - newValue; 179 179 … … 184 184 string variableName, 185 185 IClassificationModel model, 186 IEnumerable<string> allowedInputVariables, 186 187 IEnumerable<int> rows, 187 188 IEnumerable<double> targetValues, … … 196 197 } else if (modifiableDataset.VariableHasType<string>(variableName)) { 197 198 originalValues = modifiableDataset.GetReadOnlyStringValues(variableName).ToList(); 198 replacementValues = GetReplacementValuesForString(model, modifiableDataset, variableName, rows, (List<string>)originalValues, targetValues, factorReplacementMethod);199 replacementValues = GetReplacementValuesForString(model, modifiableDataset, allowedInputVariables, variableName, rows, (List<string>)originalValues, targetValues, factorReplacementMethod); 199 200 } else { 200 201 throw new NotSupportedException("Variable not supported"); … … 254 255 private static IList GetReplacementValuesForString(IClassificationModel model, 255 256 ModifiableDataset modifiableDataset, 257 IEnumerable<string> allowedInputVariables, 256 258 string variableName, 257 259 IEnumerable<int> rows, … … 270 272 List<string> curReplacementValues = Enumerable.Repeat(repl, modifiableDataset.Rows).ToList(); 271 273 //fholzing: this result could be used later on (theoretically), but is neglected for better readability/method consistency 272 var newValue = CalculateQualityForReplacement(model, modifiableDataset, variableName, originalValues, rows, curReplacementValues, targetValues);274 var newValue = CalculateQualityForReplacement(model, modifiableDataset, allowedInputVariables, variableName, originalValues, rows, curReplacementValues, targetValues); 273 275 var curQuality = newValue; 274 276 … … 308 310 IClassificationModel model, 309 311 ModifiableDataset modifiableDataset, 312 IEnumerable<string> allowedInputVariables, 310 313 string variableName, 311 314 IList originalValues, … … 317 320 var discModel = model as IDiscriminantFunctionClassificationModel; 318 321 if (discModel != null) { 319 var problemData = new ClassificationProblemData(modifiableDataset, modifiableDataset.VariableNames, model.TargetVariable);322 var problemData = new ClassificationProblemData(modifiableDataset, allowedInputVariables, model.TargetVariable); 320 323 discModel.RecalculateModelParameters(problemData, rows); 321 324 } -
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs
r17180 r17456 74 74 classValues = (double[])original.classValues.Clone(); 75 75 thresholds = (double[])original.thresholds.Clone(); 76 thresholdCalculator = (IDiscriminantFunctionThresholdCalculator)original.thresholdCalculator.Clone(); 76 77 } 77 78
Note: See TracChangeset
for help on using the changeset viewer.