- Timestamp:
- 09/07/12 16:30:40 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/CSV/ClassifiactionCSVInstanceProvider.cs
r8599 r8601 69 69 var allowedInputVars = new List<string>(); 70 70 var trainingIndizes = Enumerable.Range(0, (csvFileParser.Rows * 2) / 3); 71 foreach (var variableName in dataset.DoubleVariables) { 72 if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 73 variableName != targetVar) 74 allowedInputVars.Add(variableName); 71 if (trainingIndizes.Count() >= 2) { 72 foreach (var variableName in dataset.DoubleVariables) { 73 if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 74 variableName != targetVar) 75 allowedInputVars.Add(variableName); 76 } 77 } else { 78 allowedInputVars.AddRange(dataset.DoubleVariables.Where(x => x.Equals(targetVar))); 75 79 } 76 80 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Clustering/CSV/ClusteringCSVInstanceProvider.cs
r8599 r8601 68 68 var allowedInputVars = new List<string>(); 69 69 var trainingIndizes = Enumerable.Range(0, (csvFileParser.Rows * 2) / 3); 70 foreach (var variableName in dataset.DoubleVariables) { 71 if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 72 variableName != targetVar) 73 allowedInputVars.Add(variableName); 70 if (trainingIndizes.Count() >= 2) { 71 foreach (var variableName in dataset.DoubleVariables) { 72 if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 73 variableName != targetVar) 74 allowedInputVars.Add(variableName); 75 } 76 } else { 77 allowedInputVars.AddRange(dataset.DoubleVariables.Where(x => x.Equals(targetVar))); 74 78 } 75 79 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/CSV/RegressionCSVInstanceProvider.cs
r8599 r8601 100 100 var allowedInputVars = new List<string>(); 101 101 int trainingPartEnd = (csvFileParser.Rows * type.Training) / 100; 102 trainingPartEnd = trainingPartEnd > 0 ? trainingPartEnd : 1; 102 103 var trainingIndizes = Enumerable.Range(0, trainingPartEnd); 103 foreach (var variableName in dataset.DoubleVariables) { 104 if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 105 variableName != targetVar) 106 allowedInputVars.Add(variableName); 104 if (trainingIndizes.Count() >= 2) { 105 foreach (var variableName in dataset.DoubleVariables) { 106 if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 107 variableName != targetVar) 108 allowedInputVars.Add(variableName); 109 } 110 } else { 111 allowedInputVars.AddRange(dataset.DoubleVariables.Where(x => x.Equals(targetVar))); 107 112 } 108 113
Note: See TracChangeset
for help on using the changeset viewer.