- Timestamp:
- 09/24/12 09:44:08 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/CSV/RegressionCSVInstanceProvider.cs
r8601 r8685 129 129 public override void ExportData(IRegressionProblemData instance, string path) { 130 130 var strBuilder = new StringBuilder(); 131 132 foreach (var variable in instance. InputVariables) {133 strBuilder.Append(variable + CultureInfo.CurrentCulture.TextInfo.ListSeparator);131 var colSep = CultureInfo.CurrentCulture.TextInfo.ListSeparator; 132 foreach (var variable in instance.Dataset.VariableNames) { 133 strBuilder.Append(variable.Replace(colSep, String.Empty) + colSep); 134 134 } 135 strBuilder.Remove(strBuilder.Length - CultureInfo.CurrentCulture.TextInfo.ListSeparator.Length, CultureInfo.CurrentCulture.TextInfo.ListSeparator.Length);135 strBuilder.Remove(strBuilder.Length - colSep.Length, colSep.Length); 136 136 strBuilder.AppendLine(); 137 137 … … 140 140 for (int i = 0; i < dataset.Rows; i++) { 141 141 for (int j = 0; j < dataset.Columns; j++) { 142 if (j > 0) strBuilder.Append( CultureInfo.CurrentCulture.TextInfo.ListSeparator);142 if (j > 0) strBuilder.Append(colSep); 143 143 strBuilder.Append(dataset.GetValue(i, j)); 144 144 }
Note: See TracChangeset
for help on using the changeset viewer.