Knowledge

File:Sliding Window Error Metrics Loglog Normal Data.png

Source 📝

187:# Reproducible R code # Load necessary libraries library(ggplot2) library(patchwork) # Set seed for reproducibility set.seed(123) # Generate data n <- 10000 x <- sort(runif(n, min = 1, max = 100)) intercept <- 0.000001 slope <- 0.5 y_true_log <- intercept + slope * log10(x) noise <- rnorm(n, mean = 0, sd = .1) y_observed_log <- y_true_log + noise y_observed <- 10^y_observed_log y_true <- 10^y_true_log # Create data frame df <- data.frame(x = x, y_true = y_true, y_observed = y_observed) # Load necessary libraries library(dplyr) library(ggplot2) library(zoo) # Define window size window_size <- 28 # Calculate error metrics over sliding window df <- df %>% arrange(x) %>% mutate(MAE = rollapply(abs(y_true - y_observed), width = window_size, FUN = mean, align = "right", fill = NA), RMSE = sqrt(rollapply((y_true - y_observed)^2, width = window_size, FUN = mean, align = "right", fill = NA)), MALE = rollapply(abs(log10(y_true) - log10(y_observed)), width = window_size, FUN = mean, align = "right", fill = NA)) # Load necessary library library(tidyr) # Reshape data to long format df_long <- df %>% gather(key = "error_type", value = "error_value", MAE, RMSE, MALE) options( repr.plot.width = 12, # in inches (default = 7) repr.plot.height = 10 # in inches (default = 7) ) # Plot error metrics ggplot(df_long, aes(x = x, y = error_value, color = error_type)) + geom_line(alpha = .5) + geom_smooth() + # scale_x_log10() + # scale_y_log10() + coord_cartesian(ylim = c(0, 2.5)) + # Set the limits of the plot without excluding obs theme_bw() + theme(text = element_text(size = 25)) + theme(legend.position="bottom") + labs(x = 'X', y = 'Error', title = 'Sliding Window Analysis of Error Metrics\nin Loglog Normal Data') 38: 204: 210: 94: 632: 602: 148:
This image presents a line plot of three error metrics (Mean Absolute Error - MAE, Root Mean Square Error - RMSE, and Mean Absolute Logarithmic Error - MALE) calculated over a sliding window of size 28, plotted against the independent variable (x). Each error metric is represented by a different
251:– You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. 60: 668: 56: 52: 48: 42: 105: 73: 178: 631: 626: 547: 443: 407: 679:
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
531: 497: 391: 363: 350: 149:
color, with the corresponding smoothed line overlaying the original line. The y-axis is limited to a range of 0 to 2.5.
463: 427: 323: 306: 601: 596: 64: 37: 370: 682:
If the file has been modified from its original state, some details may not fully reflect the modified file.
220: 217: 113: 663: 642: 612: 100: 197:
I, the copyright holder of this work, hereby publish it under the following license:
158: 569:
Click on a date/time to view the file as it appeared at that time.
290:
Sliding Window Analysis of Error Metrics in Loglog Normal Data
88: 669:
User:Talgalili/sandbox/Log transformation (statistics)
78:(1,440 × 1,200 pixels, file size: 309 KB, MIME type: 132: 112:
Commons is a freely licensed media file repository.
138:
Sliding Window Error Metrics Loglog Normal Data.png
444:Creative Commons Attribution 4.0 International 93: 203: 8: 258:https://creativecommons.org/licenses/by/4.0 234:– to copy, distribute and transmit the work 684: 571: 286: 694: 686: 661: 545: 529: 511: 495: 477: 461: 441: 425: 405: 389: 337: 321: 304: 301: 282: 275: 659:The following 2 pages use this file: 7: 649:Uploaded own work with UploadWizard 560: 209: 677: 295: 289: 225: 200: 196: 142: 125: 71: 294: 264:Creative Commons Attribution 4.0 280: 245:Under the following conditions: 216:This file is licensed under the 208: 202: 92: 21: 277: 143: 14: 276: 26: 1: 548:original creation by uploader 221:Attribution 4.0 International 31: 302:Items portrayed in this file 716: 561: 168: 16: 279: 99:This is a file from the 648: 618: 174: 164: 157: 154: 135: 103:. Information from its 106:description page there 41:Size of this preview: 688:Horizontal resolution 627:11:28, 15 April 2024 597:11:31, 15 April 2024 65:1,440 × 1,200 pixels 61:1,229 × 1,024 pixels 696:Vertical resolution 240:– to adapt the work 47:Other resolutions: 364:Wikimedia username 351:author name string 703: 702: 652: 428:copyright license 288: 184: 183: 121: 120: 101:Wikimedia Commons 707: 685: 639: 609: 392:copyright status 373: 368: 358: 355: 271: 268: 265: 262: 259: 218:Creative Commons 212: 211: 206: 205: 170: 160: 147: 139: 133: 117: 96: 95: 89: 83: 81: 68: 57:922 × 768 pixels 53:576 × 480 pixels 49:288 × 240 pixels 43:720 × 600 pixels 715: 714: 710: 709: 708: 706: 705: 704: 673: 653: 645: 637: 615: 607: 563: 562: 559: 558: 557: 556: 555: 554: 553: 552: 550: 538: 537: 536: 534: 523: 522: 521: 520: 519: 518: 517: 516: 514: 504: 503: 502: 500: 489: 488: 487: 486: 485: 484: 483: 482: 480: 470: 469: 468: 466: 455: 454: 453: 452: 451: 450: 449: 448: 446: 434: 433: 432: 430: 419: 418: 417: 416: 415: 414: 413: 412: 410: 398: 397: 396: 394: 383: 382: 381: 380: 379: 378: 377: 376: 375: 374: 369: 366: 360: 359: 356: 353: 344: 343: 342: 340: 330: 329: 328: 326: 315: 314: 313: 312: 311: 309: 293: 292: 291: 274: 273: 272: 269: 266: 263: 260: 257: 256: 224: 213: 199: 198: 193: 188: 185: 150: 137: 130: 123: 122: 111: 110: 109:is shown below. 85: 79: 77: 70: 69: 46: 12: 11: 5: 713: 711: 701: 700: 697: 693: 692: 689: 676: 672: 671: 666: 657: 656: 651: 650: 647: 643: 640: 636:1,440 × 1,200 634: 629: 624: 621: 620: 617: 613: 610: 606:1,440 × 1,200 604: 599: 594: 590: 589: 586: 583: 580: 577: 574: 567: 566: 551: 546: 544: 543: 542: 541: 540: 539: 535: 532:source of file 530: 528: 527: 526: 525: 524: 515: 512: 510: 509: 508: 507: 506: 505: 501: 496: 494: 493: 492: 491: 490: 481: 478: 476: 475: 474: 473: 472: 471: 467: 462: 460: 459: 458: 457: 456: 447: 442: 440: 439: 438: 437: 436: 435: 431: 426: 424: 423: 422: 421: 420: 411: 406: 404: 403: 402: 401: 400: 399: 395: 390: 388: 387: 386: 385: 384: 362: 361: 349: 348: 347: 346: 345: 341: 338: 336: 335: 334: 333: 332: 331: 327: 322: 320: 319: 318: 317: 316: 310: 305: 303: 300: 299: 298: 297: 296: 285: 284: 281: 278: 255: 254: 253: 252: 243: 242: 241: 235: 228:You are free: 215: 214: 201: 195: 194: 192: 189: 186: 182: 181: 176: 172: 171: 166: 162: 161: 156: 152: 151: 140: 131: 129: 126: 124: 119: 118: 97: 87: 86: 40: 36: 35: 34: 29: 24: 19: 13: 10: 9: 6: 4: 3: 2: 712: 698: 695: 690: 687: 683: 680: 674: 670: 667: 665: 662: 660: 654: 646: 641: 635: 633: 630: 628: 625: 623: 622: 616: 611: 605: 603: 600: 598: 595: 592: 591: 587: 584: 581: 578: 575: 573: 572: 570: 564: 549: 533: 499: 479:15 April 2024 465: 445: 429: 409: 393: 372: 365: 352: 325: 308: 250: 247: 246: 244: 239: 236: 233: 230: 229: 227: 226: 222: 219: 207: 190: 180: 177: 173: 167: 163: 159:15 April 2024 153: 146: 141: 134: 127: 115: 108: 107: 102: 98: 91: 90: 84: 75: 74:Original file 66: 62: 58: 54: 50: 44: 39: 33: 30: 28: 25: 23: 20: 18: 15: 681: 678: 664:Log–log plot 658: 568: 565:File history 248: 237: 231: 144: 114:You can help 104: 72: 22:File history 408:copyrighted 249:attribution 136:Description 655:File usage 619:Fix header 582:Dimensions 498:media type 339:some value 261:CC BY 4.0 27:File usage 699:47.24 dpc 691:47.24 dpc 644:Talgalili 614:Talgalili 579:Thumbnail 576:Date/Time 513:image/png 464:inception 371:Talgalili 357:Talgalili 191:Licensing 179:Talgalili 145:English: 80:image/png 675:Metadata 638:(312 KB) 608:(309 KB) 283:Captions 238:to remix 232:to share 223:license. 169:Own work 32:Metadata 593:current 588:Comment 324:creator 307:depicts 287:English 128:Summary 76:‎ 175:Author 165:Source 585:User 270:true 267:true 155:Date 17:File 367:: 354:: 63:| 59:| 55:| 51:| 45:. 116:. 82:) 67:.

Index

File
File history
File usage
Metadata
File:Sliding Window Error Metrics Loglog Normal Data.png
720 × 600 pixels
288 × 240 pixels
576 × 480 pixels
922 × 768 pixels
1,229 × 1,024 pixels
1,440 × 1,200 pixels
Original file
Wikimedia Commons
description page there
You can help
Talgalili
Creative Commons
Attribution 4.0 International
depicts
creator
author name string
Wikimedia username
Talgalili
copyright status
copyrighted
copyright license
Creative Commons Attribution 4.0 International
inception
media type
source of file

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.