Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
463 views
in Technique[技术] by (71.8m points)

python - multivariate kernel density estimation in sklearn

What is going on when I use something like

KernelDensity(kernel='gaussian', bandwidth=1.0).fit(X)

(cf. https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KernelDensity.html) with X an n-by-d (instances by features) 2D-array?

Is this a really a multivariate Gaussian, i.e. is a sample covariance matrix being calculated from X (and scaled by the bandwidth) as described in something like the scipy implementation https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.gaussian_kde.html? If so, how do I retrieve that information? I assume it isn't (otherwise the docs would say so), but it's not clear what the above actually produces.

FWIW, I'm trying to build a probabilistic classifier (Bayesian with kernel density estimation) and thought I'd try to use what's out there instead of starting from scratch (since I know nothing about stats, computers, or machine learning). My starting point is more-or-less https://jakevdp.github.io/PythonDataScienceHandbook/05.13-kernel-density-estimation.html#Example:-Not-So-Naive-Bayes.

question from:https://stackoverflow.com/questions/65888502/multivariate-kernel-density-estimation-in-sklearn

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...