Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • s2dv s2dv
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • s2dvs2dv
  • Issues
  • #94
Closed
Open
Issue created Mar 30, 2023 by aho@ahoMaintainer

RPSS() performance

Hi @nmilders @jramon @vagudets

As you mentioned in the verification suite meeting that RPSS() takes a long time, I did some profiling for RPSS(). Unfortunately, the most time-consuming part is the easyVerification::convert2prob function, which is used in .GetProbs(). It uses a couple of apply() functions that are known to be heavy. I also improved RPS() and RPSS() to avoid using apply() if I can, but those parts are minor problems.

I provide two profiling files. (1) is a more realistic case (too big to be attached), and (2) is a lighter case.

library(profvis)

# (1)
set.seed(1)
exp1 <- array(rnorm(60), dim = c(member = 25, sdate = 10, lat = 180, lon = 360))
set.seed(2)
obs1 <- array(rnorm(20), dim = c(sdate = 10, lat = 180, lon = 360))

# (2)
set.seed(1)
exp1 <- array(rnorm(60), dim = c(member = 25, sdate = 1, lat = 18, lon = 36))
set.seed(2)
obs1 <- array(rnorm(20), dim = c(sdate = 1, lat = 18, lon = 36))

profvis({
  res <- RPSS(exp1, obs1)
})

(1) profiling file: /home/Earth/aho/tmp/RPSS_profvis.Rprofvis
(2) profiling file RPSS_small_profvis.Rprofvis

We can still merge the improvement !145 (merged) (better than nothing.) If you have any suggestion, please let me know, thanks!

Best,
An-Chi

Edited Mar 30, 2023 by aho
Assignee
Assign to
Time tracking