파일:Sliding Window Error Metrics Loglog Normal Data.png

testwiki
둘러보기로 이동 검색으로 이동
    원본 파일 (1,440 × 1,200 픽셀, 파일 크기: 309 KB, MIME 종류: image/png)

    이 파일은 위키미디어 공용에 있으며, 다른 프로젝트에서 사용하고 있을 가능성이 있습니다. 해당 파일에 대한 설명이 아래에 나와 있습니다.

    파일 설명

    설명
    English: 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 color, with the corresponding smoothed line overlaying the original line. The y-axis is limited to a range of 0 to 2.5.
    날짜
    출처 자작
    저자 Talgalili
    # 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')
    

    라이선스

    나는 아래 작품의 저작권자로서, 이 저작물을 다음과 같은 라이선스로 배포합니다:
    w:ko:크리에이티브 커먼즈
    저작자표시
    이 파일은 크리에이티브 커먼즈 저작자표시 4.0 국제 라이선스로 배포됩니다.
    이용자는 다음의 권리를 갖습니다:
    • 공유 및 이용 – 저작물의 복제, 배포, 전시, 공연 및 공중송신
    • 개작 – 저작물의 개작, 수정, 2차적저작물 창작
    다음과 같은 조건을 따라야 합니다:
    • 저작자표시 – 적절한 저작자 표시를 제공하고, 라이선스에 대한 링크를 제공하고, 변경사항이 있는지를 표시해야 합니다. 당신은 합리적인 방식으로 표시할 수 있지만, 어떤 방식으로든 사용권 허가자가 당신 또는 당신의 사용을 지지하는 방식으로 표시할 수 없습니다.

    설명

    이 파일이 나타내는 바에 대한 한 줄 설명을 추가합니다
    Sliding Window Analysis of Error Metrics in Loglog Normal Data

    이 파일에 묘사된 항목

    다음을 묘사함

    위키데이터 항목 없는 어떤 값

    316,064 바이트

    1,200 화소

    1,440 화소

    965bb78a75eed43ba9e3185e1d20f16fd4092829

    파일 역사

    날짜/시간 링크를 클릭하면 해당 시간의 파일을 볼 수 있습니다.

    날짜/시간섬네일크기사용자설명
    현재2024년 4월 15일 (월) 12:312024년 4월 15일 (월) 12:31 판의 섬네일1,440 × 1,200 (309 KB)wikimediacommons>TalgaliliFix header

    이 파일을 사용하는 문서가 없습니다.