在R中,有一个名为^{
density(x, bw = "nrd0", adjust = 1, kernel = c("gaussian", "epanechnikov",
"rectangular", "triangular", "biweight","cosine", "optcosine"),
weights = NULL, window = kernel, width, give.Rkern = FALSE, n = 512,
from, to, cut = 3, na.rm = FALSE, …)
在不同的参数中,我通常使用的参数是x
(计算估计值的数值向量)&adjust
。我将其他参数保留为其默认值(bw = "nrd0"
,n = 512
&;kernel = "gaussian"
)
Python中是否有函数接受相同(或等效)的输入并返回相同的输出。我要寻找的主要输出是512(因为n=512)x&;y值
根据Oliver的建议,我使用rpy2从Python中调用了R的密度函数
R代码
Python代码
相关问题 更多 >
编程相关推荐