RipleyK
詳細とオプション
- 積
(
は平均密度)は,典型的な点からの距離が r 以内の,点自体を数えない点の期待数を与える. -

- RipleyKは,距離 r 内の点集合の空間均質性を測定する.ポアソン(Poisson)点過程と比較すると以下のようになる.
-

ポアソン過程よりも分散している 
ポアソン過程のようである,つまり,完全な空間ランダム性 
ポアソン過程よりクラスタ化している
は
における単位球の体積である.-

- 半径 r は,単一の値でも値のリストでもよい.RipleyKは半径 r が指定されていないとPointStatisticFunctionを返す.これを使って
関数を繰り返し評価することができる. - 点 pdata には次の形がある.
-
{p1,p2,…} 点 pi GeoPosition[…],GeoPositionXYZ[…],… 地理的な点 SpatialPointData[…] 空間点の集合 {pts,reg} 点集合 pts と観測領域 reg - 観測領域 reg が与えられていないと,RipleyRassonRegionを使って自動的に領域が計算される.
- 点過程 pproc には次の形がある.
-
proc 点過程 proc {proc,reg} 点過程 proc と観測領域 reg - 観測領域 reg はパラメータフリーでSpatialObservationRegionQでなければならない.
- ビン分割データ bdata はSpatialBinnedPointDataからのもので,区分定数強化関数によってInhomogeneousPoissonPointProcessとして扱われる.
は pdata について,互いの距離が r 以内の点の重複しないペアを数えることで計算される.
は pproc について,厳密な公式を使ってあるいはシミュレーションで点データを生成して計算される.- 次は,使用可能なオプションである.
-
Method Automatic 使用するメソッド SpatialBoundaryCorrection Automatic 使用する境界補正 - SpatialBoundaryCorrectionには,次の設定を使うことができる.
-
Automatic 自動的に決定された境界補正 None 境界補正なし "BorderMargin" 観測領域として内側余白を使う "Ripley" 境界までの点の距離に依存する重みを使う
例題
すべて開く すべて閉じる例 (3)
region = Ball[{0, 0}];
pts = RandomPoint[region, 100];RipleyK[{pts, region}, 0.2]spd = SpatialPointData[RandomReal[1, {500, 3}]]rspec = Range[0.1, 0.4, 0.01];est = RipleyK[spd, rspec];ListPlotで結果を可視化する:
ListPlot[est, DataRange -> MinMax[rspec], AxesLabel -> {r}, Filling -> Axis]kfun = RipleyK[MaternPointProcess[μ, λ, R, 2], r]Plot[kfun /. {μ -> 3, λ -> 2, R -> 1}, {r, 0, 3}, AxesLabel -> Automatic]スコープ (10)
点データ (5)
region = Rectangle[{0, 0}, {1, 2}];
pts = RandomPoint[region, 100];RipleyK[{pts, region}, 0.2]Ripleyの
関数の経験的推定を指定された距離のリストから取得する:
RipleyK[{pts, region}, {0.1, 0.3, 0.05, 0.23}]RipleyKとSpatialPointDataを一緒に使う:
spd = SpatialPointData[RandomReal[1, {500, 2}]]res = RipleyK[spd, {0.01, 0.02}]後で使うためにPointStatisticFunctionを作る:
reg = Disk[];
pts = RandomPoint[Disk[], 100];psf = RipleyK[{pts, reg}]psf[0.5]明示的に観測領域を与えることはせずにRipleyの
関数を推定する:
BlockRandom[
SeedRandom[1];
pts = RandomReal[1, {100, 2}]];psf = RipleyK[pts]Ripley–Rasson推定器によって生成された観測領域:
psf["ObservationRegion"]psf[0.3]RipleyKをGeoPositionと一緒に使う:
pts = RandomGeoPosition[GeoDisk[GeoPosition[{0, 0}], Quantity[10, "Kilometers"]], 10 ^ 2]psf = RipleyK[pts]ListPlot[Table[{x, psf[x]}, {x, Quantity[0, "km"], psf["MaxRadius"], Quantity[.1, "km"]}], AxesLabel -> {"km"}]点過程 (5)
PoissonPointProcessについてのRipleyの
関数は,強度に依存しない閉じた形を持つ:
proc = PoissonPointProcess[μ, d];RipleyK[proc, r]Plot[Table[RipleyK[proc, r], {d, 1, 4}]//Evaluate, {r, 0, 1.3}, AxesLabel -> Automatic, PlotLegends -> (Row[{#, "D"}]& /@ Range[4])]指定された次元のクラスタ過程ThomasPointProcessについてのRipleyの
関数:
proc2D = ThomasPointProcess[μ, λ, σ, 2];RipleyK[proc2D, r]これは,同じ密度の二次元PoissonPointProcessよりも常に大きい:
RipleyK[PoissonPointProcess[μ, 2], r]Refine[%% - %, r ≥ 0]proc3D = ThomasPointProcess[μ, λ, σ, 3];RipleyK[proc3D, r]RipleyK[PoissonPointProcess[μ, 3], r]Refine[%% - %, r ≥ 0]指定された次元のクラスタ過程MaternPointProcessについてのRipleyの
関数:
proc2D = MaternPointProcess[μ, λ, rad, 2];RipleyK[proc2D, r]proc3D = MaternPointProcess[μ, λ, rad, 3];RipleyK[proc3D, rad]クラスタ過程CauchyPointProcessについてのRipleyの
関数:
proc = CauchyPointProcess[μ, λ, b, dim];RipleyK[proc, r]クラスタ過程VarianceGammaPointProcessについてのRipleyの
関数:
proc = VarianceGammaPointProcess[μ, λ, α, β, dim];RipleyK[proc, r]オプション (2)
SpatialBoundaryCorrection (2)
境界補正のないRipleyK推定量は偏っているので,大きい点集合でなければ使うべきではない:
region = Rectangle[{0, 0}, {2, 1}];
pts = RandomPoint[region, 100];r = 0.2;RipleyK[{pts, region}, r, SpatialBoundaryCorrection -> None]デフォルトメソッドの"BorderMargin"は境界からの距離が
の点だけを考慮する:
inregion = Rectangle[{r, r}, {2 - r, 1 - r}];
Show[RegionPlot[{region, inregion}, AspectRatio -> Automatic], ListPlot[pts]]RipleyK[{pts, region}, r, SpatialBoundaryCorrection -> "BorderMargin"]境界補正法の"Ripley"は点の各ペアに重みを付けて推定量に偏りがないようにする:
RipleyK[{pts, region}, r, SpatialBoundaryCorrection -> "Ripley"]reg = Ball[{0, 0, 0}];
pts = RandomPoint[reg, 200];rad = Range[0.01, 0.5, 0.02];
m = {"None", "BorderMargin", "Ripley"};data = RipleyK[{pts, reg}, rad, SpatialBoundaryCorrection -> #]& /@ m;val = RipleyK[PoissonPointProcess[λ, 3], r]Show[ListPlot[data, DataRange -> MinMax[rad], PlotLegends -> m], Plot[val, {r, 0, 0.5}, PlotStyle -> Gray, PlotLegends -> {val}], AxesLabel -> {r}]アプリケーション (6)
Ripleyの
関数は距離において累積的であり,したがって単調増加である:
region = Ellipsoid[{0, 0}, {2, 3}];
pts = RandomPoint[region, 500];fun = RipleyK[pts]Plot[fun[r], {r, 0, 1}, AxesLabel -> Automatic]region[d_] := Ball[d]
pts[d_] := RandomPoint[region[d], 500];rspec = Range[0.02, 0.8, 0.02];
data = Table[RipleyK[{pts[d], region[d]}, rspec], {d, 1, 5}];ListLinePlot[data, DataRange -> MinMax[rspec], AxesLabel -> {r}, PlotLegends -> (Row[{#, "D"}]& /@ Range[5])]ハードコア点過程の点はハードコア半径
よりも近くてはならない:
region = Ellipsoid[{0, 0}, {1, 2}];
radii = {0.05, 0.1, 0.15};
spds = Table[RandomPointConfiguration[HardcorePointProcess[200, R, 2], region, Method -> {"MCMC", "LengthOfRun" -> 30000}], {R, radii}];Table[Graphics[Point[spds[[k]]["Points"]], PlotRange -> {{-1, 1}, {-2, 2}}, Frame -> True, FrameLabel -> Row[{"hard-core R = ", radii[[k]]}]], {k, 3}]rspec = Range[0.01, 0.3, 0.01];
data = Table[RipleyK[spd, rspec], {spd, spds}];ListLinePlot[data, DataRange -> MinMax[rspec], AxesLabel -> {r}, PlotLegends -> (Row[{"hard-core R = ", #}]& /@ radii)]Map[rspec[[FirstPosition[#, _ ? Positive]]]&, data]//FlattenクラスタデータについてのRipleyの
関数は完全に空間的にランダムなデータよりも高い.次はクラスタ過程からのサンプルである:
reg = Rectangle[{0, 0}, {4, 4}];
ptsT = RandomPointConfiguration[ThomasPointProcess[30, 20, .5, 2], reg];同じ強度のポアソン点過程から比較参照用のサンプルを生成する:
ptsP = RandomPointConfiguration[PoissonPointProcess[30, 2], reg];ListPlot[#["Points"], AspectRatio -> 1]& /@ {ptsP, ptsT}RipleyK関数を比較する:
rspec = Range[0.02, 2, 0.02];ListLinePlot[{RipleyK[ptsP, rspec], RipleyK[ptsT, rspec]}, PlotLegends -> {"Poisson", "Thomas"}, DataRange -> MinMax[rspec], AxesLabel -> {r}]2000年から2015年までにカリフォルニアで発生したマグニチュード4以上の地震:
reg = Polygon[Entity["AdministrativeDivision", {"California", "UnitedStates"}]];series = EarthquakeData[reg, 4, {DateObject[{2000}], DateObject[{2015}]}, "Position"]data = Normal[series["Values"]];RipleyKを計算する:
psf = RipleyK[data]density = Length[data] / GeoArea[reg];データ中の典型的な点から半径2マイルで発生した地震の期待数:
psf[Quantity[2, "Miles"]] * densityRipleyの
関数を使ってPairCorrelationGを推定する:
reg = Disk[];
pts = RandomPoint[reg, 10 ^ 3];rlist = Range[0.01, 0.2, 0.01];pc = PairCorrelationG[{pts, reg}, rlist];ripleyK = RipleyK[pts]pcK = PairCorrelationG[{ripleyK, {0, 0.2, 0.01}}, rlist];ListLinePlot[{pc, pcK}, DataRange -> MinMax@rlist, PlotLegends -> {"PC from data", "PC estimated from K"}, AxesLabel -> {r}]特性と関係 (1)
BesagLはRipleyKの安定した分散である.
,ただし,
はRipleyの
関数,
は空間次元,
は
における単位球体の体積である:
region = Ball[{0, 0, 0}];
pts = RandomPoint[region, 100];v1 = RipleyK[{pts, region}, 0.2];
v2 = BesagL[{pts, region}, 0.2];Power[v1 / RegionMeasure[Ball[3]], 1 / 3] == v2考えられる問題 (1)
境界補正がある経験的RipleyKは増加しないかもしれない(特に小さい集合に対しては):
region = Rectangle[];
data = RandomPoint[region, 30];Plot[RipleyK[{data, region}][r], {r, 0, 1 / 2}]境界補正がないRipleyKは増加する:
Plot[RipleyK[{data, region}, r, SpatialBoundaryCorrection -> None], {r, 0, 1 / 2}]テキスト
Wolfram Research (2020), RipleyK, Wolfram言語関数, https://reference.wolfram.com/language/ref/RipleyK.html.
CMS
Wolfram Language. 2020. "RipleyK." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RipleyK.html.
APA
Wolfram Language. (2020). RipleyK. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RipleyK.html
BibTeX
@misc{reference.wolfram_2026_ripleyk, author="Wolfram Research", title="{RipleyK}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/RipleyK.html}", note=[Accessed: 01-December-2026]}
BibLaTeX
@online{reference.wolfram_2026_ripleyk, organization={Wolfram Research}, title={RipleyK}, year={2020}, url={https://reference.wolfram.com/language/ref/RipleyK.html}, note=[Accessed: 01-December-2026]}