tnagler / kdevine Goto Github PK
View Code? Open in Web Editor NEWKernel density estimation based on vine copulas
License: GNU General Public License v3.0
Kernel density estimation based on vine copulas
License: GNU General Public License v3.0
Dear Nagler
I need help in R, please.
usually, any package of any distribution in R contains three commands such as rname, dname and pname. I found a package called kdevine https://github.com/tnagler/kdevine
and it has dkdevinecop and rkdevinecop but it doesn't have the option pkdevinecop (the CDF). I tried to write it like this but it is wrong, could you see it, please
Regards
library(kdevine)
library(kdecopula)
data(wdbc)
fit <- kdevine(wdbc[, 5:7], xmin = rep(0, 3))
f<-dkdevine(wdbc[, 5:7], fit)
for(i in 1:length(f)){
p<-sum(dkdevinecop(c(wdbc[, 5],wdbc[,6],wdbc[,7]),fit))
}
print (p)
Hey again :) One issue I am running into is handling categorical variables in a principled manner - I jittered mine to get an approximate answer.
Are there any theoretical obstacles with adding something like Aitchison-Aitken kernel and the corresponding CDF to also handle unordered, categorical data, similar to np package, while still maintaining control of the curse of dimensionality?
This example creates a C stack issue:
library(kdevine, quietly = TRUE)
data(wdbc) # load data
wdbc[wdbc == 0] <- .Machine$double.eps
fit <- kdevine(as.matrix(wdbc[sample(nrow(wdbc), 2e3, replace = TRUE), 2:3]),
xmin = rep(0, 2), cores = 1, info = F)
I tried this both on Mac and Ubuntu. If you reduce the number of samples from 2e3 to 1e3, error goes away. I traced it back to locfit, but not sure how to fix it.
Hi again. I profiled
if (!require(profvis)) install.packages("profvis")
library(kdevine)
data(wdbc)
wdbc[wdbc == 0] <- .Machine$double.eps
profvis::profvis(
kdevine(as.matrix(wdbc[sample(nrow(wdbc), 2e4, replace = TRUE), 2:6]),
xmin = rep(0, 5), cores = 1, info = FALSE)
)
with profvis and have noticed that ~82% of time is spent on garbage collection. For a dataset of ~2 Mb, ~100 Gb worth of objects was allocated and destroyed.
Do you have any insight into why that is happening and whether any fixes come to mind?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.