-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add and subtract kerneldensities #93
Comments
I am not quite sure it would make sense directly (with
but even if we ignore technical complications (bandwidth selection etc) information is lost with the lengths of (Sorry if I misunderstood the question.) |
Not quite sure - to be exact this is what I wanted (I'll post my code, as it's essentially an MWE): using CSV, Plots, DataFrames, StatsPlots, KernelDensity
after = CSV.read("Pcoa_AFTER_27jan21.txt", DataFrame)
before = CSV.read("Pcoa_BEFORE_27jan21.txt", DataFrame)
function pplot(obj)
x, y = obj[!,"Axis.1"], obj[!,"Axis.2"]
kd = kde((x,y))
p = plot(kd, st = :contourf, color = :viridis, lc = :white, lw = 0.2)
scatter!(p, x, y, msw = 0, color = :lightgrey, ms = 2, label = "")
p
end
plot(
pplot(before),
pplot(after),
size = (1000, 400), clim = (0, 60)
)
I'm not sure it makes 100% sense statistically, sorry - there was some discussion on Slack https://julialang.slack.com/archives/C6821M4KE/p1611916388016600 |
But I guess the conclusion is that |
Would it make sense to be able to do arithmetic on the kde objects, e.g. to add and subtract them, for comparing distributions?
The text was updated successfully, but these errors were encountered: