Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up summary stats; transpose error bars #24

Merged
merged 1 commit into from
Oct 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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