Changeset 11540
- Timestamp:
- 11/12/14 14:16:38 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Clustering/CSV/ClusteringCSVInstanceProvider.cs
r11283 r11540 61 61 62 62 Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values); 63 string targetVar = dataset.DoubleVariables.Last();64 63 65 64 // turn of input variables that are constant in the training partition … … 68 67 if (trainingIndizes.Count() >= 2) { 69 68 foreach (var variableName in dataset.DoubleVariables) { 70 if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 71 variableName != targetVar) 69 if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0) 72 70 allowedInputVars.Add(variableName); 73 71 } 74 72 } else { 75 allowedInputVars.AddRange(dataset.DoubleVariables .Where(x => !x.Equals(targetVar)));73 allowedInputVars.AddRange(dataset.DoubleVariables); 76 74 } 77 75 … … 96 94 97 95 Dataset dataset = new Dataset(csvFileParser.VariableNames, values); 98 string targetVar = dataset.DoubleVariables.Last();99 96 100 97 // turn of input variables that are constant in the training partition … … 104 101 if (trainingIndizes.Count() >= 2) { 105 102 foreach (var variableName in dataset.DoubleVariables) { 106 if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 107 variableName != targetVar) 103 if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0) 108 104 allowedInputVars.Add(variableName); 109 105 } 110 106 } else { 111 allowedInputVars.AddRange(dataset.DoubleVariables .Where(x => !x.Equals(targetVar)));107 allowedInputVars.AddRange(dataset.DoubleVariables); 112 108 } 113 109
Note: See TracChangeset
for help on using the changeset viewer.