91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 4KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-08
  • 語言: Matlab
  • 標(biāo)簽: 2DKDE??

資源簡(jiǎn)介

MATLAB實(shí)現(xiàn)的二維核密度估計(jì)。 輸入平面樣本點(diǎn),得到概率密度函數(shù)。 2D Kernel Density Estimation。

資源截圖

代碼片段和文件信息

function?[bandwidthdensityXY]=kde2d(datanMIN_XYMAX_XY)
%?fast?and?accurate?state-of-the-art
%?bivariate?kernel?density?estimator
%?with?diagonal?bandwidth?matrix.
%?The?kernel?is?assumed?to?be?Gaussian.
%?The?two?bandwidth?parameters?are
%?chosen?optimally?without?ever
%?using/assuming?a?parametric?model?for?the?data?or?any?“rules?of?thumb“.
%?Unlike?many?other?procedures?this?one
%?is?immune?to?accuracy?failures?in?the?estimation?of
%?multimodal?densities?with?widely?separated?modes?(see?examples).
%?INPUTS:?data?-?an?N?by?2?array?with?continuous?data
%????????????n?-?size?of?the?n?by?n?grid?over?which?the?density?is?computed
%????????????????n?has?to?be?a?power?of?2?otherwise?n=2^ceil(log2(n));
%????????????????the?default?value?is?2^8;
%?MIN_XYMAX_XY-?limits?of?the?bounding?box?over?which?the?density?is?computed;
%????????????????the?format?is:
%????????????????MIN_XY=[lower_Xlimlower_Ylim]
%????????????????MAX_XY=[upper_Xlimupper_Ylim].
%????????????????The?dafault?limits?are?computed?as:
%????????????????MAX=max(data[]1);?MIN=min(data[]1);?Range=MAX-MIN;
%????????????????MAX_XY=MAX+Range/4;?MIN_XY=MIN-Range/4;
%?OUTPUT:?bandwidth?-?a?row?vector?with?the?two?optimal
%?????????????????????bandwidths?for?a?bivaroate?Gaussian?kernel;
%?????????????????????the?format?is:
%?????????????????????bandwidth=[bandwidth_X?bandwidth_Y];
%??????????density??-?an?n?by?n?matrix?containing?the?density?values?over?the?n?by?n?grid;
%?????????????????????density?is?not?computed?unless?the?function?is?asked?for?such?an?output;
%??????????????XY??-?the?meshgrid?over?which?the?variable?“density“?has?been?computed;
%?????????????????????the?intended?usage?is?as?follows:
%?????????????????????surf(XYdensity)
%?Example?(simple?Gaussian?mixture)
%?clear?all
%???%?generate?a?Gaussian?mixture?with?distant?modes
%???data=[randn(5002);
%???????randn(5001)+3.5?randn(5001);];
%???%?call?the?routine
%?????[bandwidthdensityXY]=kde2d(data);
%???%?plot?the?data?and?the?density?estimate
%?????contour3(XYdensity50)?hold?on
%?????plot(data(:1)data(:2)‘r.‘‘MarkerSize‘5)
%
%?Example?(Gaussian?mixture?with?distant?modes):
%
%?clear?all
%??%?generate?a?Gaussian?mixture?with?distant?modes
%??data=[randn(1001)?randn(1001)/4;
%??????randn(1001)+18?randn(1001);
%??????randn(1001)+15?randn(1001)/2-18;];
%??%?call?the?routine
%????[bandwidthdensityXY]=kde2d(data);
%??%?plot?the?data?and?the?density?estimate
%??surf(XYdensity‘Linestyle‘‘none‘)?view([060])
%??colormap?hot?hold?on?alpha(.8)
%??set(gca?‘color‘?‘blue‘);
%??plot(data(:1)data(:2)‘w.‘‘MarkerSize‘5)
%
%?Example?(Sinusoidal?density):
%
%?clear?all
%???X=rand(10001);?Y=sin(X*10*pi)+randn(size(X))/3;?data=[XY];
%??%?apply?routine
%??[bandwidthdensityXY]=kde2d(data);
%??%?plot?the?data?and?the?density?estimate
%??surf(XYdensity‘Linestyle‘‘none‘)?view([070])
%??colormap?hot?hold?on?alpha(.8)
%??se

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件????????342??2016-01-26?15:49??run.m

?????文件???????7762??2015-12-30?18:46??kde2d.m

?????文件???????1540??2015-12-30?18:46??license.txt

-----------?---------??----------?-----??----

?????????????????9644????????????????????3


評(píng)論

共有 條評(píng)論

相關(guān)資源