Changeset 9607
- Timestamp:
- 06/11/13 16:37:01 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MenuItems/ExportSymbolicSolutionToExcelMenuItem.cs
r9600 r9607 124 124 modelWorksheet.Cells[row, 2].Value = solution.Model.LowerEstimationLimit; 125 125 modelWorksheet.Names.Add("EstimationLimitLower", modelWorksheet.Cells[row, 2]); 126 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 126 127 row++; 127 128 … … 129 130 modelWorksheet.Cells[row, 2].Value = solution.Model.UpperEstimationLimit; 130 131 modelWorksheet.Names.Add("EstimationLimitUpper", modelWorksheet.Cells[row, 2]); 132 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 131 133 row += 2; 132 134 … … 167 169 modelWorksheet.Cells[row, 1].Value = "Pearson's R² (training)"; 168 170 modelWorksheet.Cells[row, 2].Formula = string.Format("POWER(PEARSON({0},{1}),2)", excelTrainingTarget, excelTrainingEstimated); 171 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 169 172 row++; 170 173 171 174 modelWorksheet.Cells[row, 1].Value = "Pearson's R² (test)"; 172 175 modelWorksheet.Cells[row, 2].Formula = string.Format("POWER(PEARSON({0},{1}),2)", excelTestTarget, excelTestEstimated); 176 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 173 177 row++; 174 178 … … 176 180 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingMSE); 177 181 modelWorksheet.Names.Add("TrainingMSE", modelWorksheet.Cells[row, 2]); 182 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 178 183 row++; 179 184 … … 181 186 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestMSE); 182 187 modelWorksheet.Names.Add("TestMSE", modelWorksheet.Cells[row, 2]); 188 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 183 189 row++; 184 190 185 191 modelWorksheet.Cells[row, 1].Value = "Mean absolute error (training)"; 186 192 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingAbsoluteError); 193 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 187 194 row++; 188 195 189 196 modelWorksheet.Cells[row, 1].Value = "Mean absolute error (test)"; 190 197 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestAbsoluteError); 198 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 191 199 row++; 192 200 193 201 modelWorksheet.Cells[row, 1].Value = "Mean error (training)"; 194 202 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingMeanError); 203 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 195 204 row++; 196 205 197 206 modelWorksheet.Cells[row, 1].Value = "Mean error (test)"; 198 207 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestMeanError); 208 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 199 209 row++; 200 210 … … 211 221 modelWorksheet.Cells[row, 1].Value = "Normalized Mean Squared error (training)"; 212 222 modelWorksheet.Cells[row, 2].Formula = string.Format("TrainingMSE / VAR({0})", excelTrainingTarget); 223 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 213 224 row++; 214 225 215 226 modelWorksheet.Cells[row, 1].Value = "Normalized Mean Squared error (test)"; 216 227 modelWorksheet.Cells[row, 2].Formula = string.Format("TestMSE / VAR({0})", excelTestTarget); 228 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 217 229 218 230 modelWorksheet.Cells["A1:B" + row].AutoFitColumns(); … … 300 312 estimatedWorksheet.Cells[i + 2, 9].Formula = string.Format(preparedFormula, i + 2); 301 313 } 314 estimatedWorksheet.Cells["B2:B" + (rows + 1)].Style.Numberformat.Format = "0.000"; 302 315 303 316 estimatedWorksheet.Cells["C2:C" + (rows + 1)].Formula = "J2"; 304 317 estimatedWorksheet.Cells["C2:C" + (rows + 1)].Style.Numberformat.Format = "0.000"; 305 318 estimatedWorksheet.Cells["D2:D" + (rows + 1)].Formula = "ABS(B2 - C2)"; 319 estimatedWorksheet.Cells["D2:D" + (rows + 1)].Style.Numberformat.Format = "0.000"; 306 320 estimatedWorksheet.Cells["E2:E" + (rows + 1)].Formula = "ABS(D2 / B2)"; 321 estimatedWorksheet.Cells["E2:E" + (rows + 1)].Style.Numberformat.Format = "0.000"; 307 322 estimatedWorksheet.Cells["F2:F" + (rows + 1)].Formula = "C2 - B2"; 323 estimatedWorksheet.Cells["F2:F" + (rows + 1)].Style.Numberformat.Format = "0.000"; 308 324 estimatedWorksheet.Cells["G2:G" + (rows + 1)].Formula = "POWER(F2, 2)"; 309 325 estimatedWorksheet.Cells["G2:G" + (rows + 1)].Style.Numberformat.Format = "0.000"; 326 327 estimatedWorksheet.Cells["I2:I" + (rows + 1)].Style.Numberformat.Format = "0.000"; 310 328 estimatedWorksheet.Cells["J2:J" + (rows + 1)].Formula = "IFERROR(IF(I2 > Model!EstimationLimitUpper, Model!EstimationLimitUpper, IF(I2 < Model!EstimationLimitLower, Model!EstimationLimitLower, I2)), AVERAGE(Model!EstimationLimitLower, Model!EstimationLimitUpper))"; 329 estimatedWorksheet.Cells["J2:J" + (rows + 1)].Style.Numberformat.Format = "0.000"; 311 330 } 312 331
Note: See TracChangeset
for help on using the changeset viewer.