ParamHelpers icon indicating copy to clipboard operation
ParamHelpers copied to clipboard

ploting: getOptPathColAtTimes

Open jakob-r opened this issue 9 years ago • 4 comments

Before it gets lost - here something which might contribute to plotting. Why do we need it? I needed it because

  • Comparing different opt.paths
  • Averaging opt.paths at a given time
getOptPathColAtTimes = function(op, times) {
  if (!is.data.frame(op))
    op = as.data.frame(op)
  assertNumeric(op$exec.time)
  op$exec.time.sum = cumsum(op$env$exec.time)
  op$finished = c(rep(FALSE, times = nrow(op) - 1), TRUE)
  adply(times, 1, getOptPathColAtTime, op = op)

}

getOptPathColAtTime = function(op.df, time) {
  col = op.df[which.last(op.df$exec.time.sum<=time), ]
  if (nrow(col) == 1) col$time = time
  col
}

jakob-r avatar Mar 09 '15 10:03 jakob-r

We have a good plot-function for a single opt.path now. Do we need plot-functions for comparing multiple opt.paths?

I will add the EAF-function today, so we have a function to compare multiplie multi-crit opt.paths. Do we need something similar for single-crit? What would we want to see in such plots? Plot average y-value versus time? As a line-plot?

danielhorn avatar Jun 12 '15 08:06 danielhorn

I have added functions plot and renderYTrace: They take a list of opt.paths and plot a lineplot. On the y-axis the values of the y-variable are plotted, on the x-axis either the dob or the cumulated exec.time (using Jakobs functions).

As for the EAFs, do we need a nice example here?

danielhorn avatar Jun 12 '15 13:06 danielhorn

@jakob-r I find this resaonable and good. please do a PR for this. Try to look and daniels code and reuse it, if somehow possible.

OK?

berndbischl avatar Sep 24 '15 14:09 berndbischl

I mean plotYTraces

berndbischl avatar Sep 24 '15 14:09 berndbischl