Skip to content

Commit

Permalink
Merge pull request #24 from alanderos91/develop
Browse files Browse the repository at this point in the history
Clean up summary stats; transpose error bars
  • Loading branch information
alanderos91 committed Oct 8, 2019
2 parents f8436ec + 2b69ebc commit 5c10b0b
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/output/average_path.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,18 @@ end

function AveragePath(xw :: RegularEnsemble{T1,T2}) where {T1,T2}
tdata = xw[1].tdata

d = size(xw[1].xdata, 1)
n = length(tdata)
trials = length(xw)

xmean = mean(xw[k].xdata for k in 1:trials)
temp = std([xw[k].xdata[i, j] for i in 1:d, j in 1:n, k in 1:trials], dims=3)
xstd = reshape(temp, n, d)
# temporary fix
x = [xw[k].xdata for k in 1:trials]

return AveragePath{T1}(tdata, xmean, xstd)
return AveragePath{T1}(tdata, mean(x), std(x))
end

@recipe function f(xw :: AveragePath)
tdata = xw.tdata
xmean = xw.xmean'
xstd = xw.xstd
xmean = transpose(xw.xmean)
xstd = transpose(xw.xstd)

legend --> true
grid --> false
Expand Down

0 comments on commit 5c10b0b

Please sign in to comment.