quadratAnalysis
描述
¥Description
二次方分析在研究区域上放置一组大小相等的区域(二次方),计算每个二次方中的要素数量并创建频率表。表格列出了不包含任何特性的方格数、包含一个特性的方格数、包含两个特性的方格数,依此类推,直到包含最多特性的方格数。然后,该方法创建随机分布的频率表,通常基于泊松分布。该方法使用该分布计算 0 个特性出现的概率、1 个特性出现的概率、2 个特性出现的概率等等,并将这些概率列在频率表中。通过比较两个频率表,你可以查看这些特性是否形成了一种模式。如果观测分布的表格比随机分布的表格包含更多包含特性的方格,则这些特性将形成聚集模式。
¥Quadrat analysis lays a set of equal-size areas(quadrat) over the study area and counts the number of features in each quadrat and creates a frequency table. The table lists the number of quadrats containing no features, the number containing one feature, two features, and so on, all the way up to the quadrat containing the most features. The method then creates the frequency table for the random distribution, usually based on a Poisson distribution. The method uses the distribution to calculate the probability for 0 feature occuring, 1 feature occuring, 2 features, and so on, and lists these probabilities in the frequency table. By comparing the two frequency tables, you can see whether the features create a pattern. If the table for the observed distribution has more quadrats containing many features than the table for the random distribution dose, then the features create a clustered pattern.
仅凭外观很难判断频率表是相似还是不同。因此,我们可以使用多种统计检验来找出频率表的差异。我们使用 Kolmogorov-Smirnov 检验。此方法计算两个分布的累积概率,然后比较每个类别级别的累积概率,并选择最大的绝对差 D。然后,测试将 D 与你指定的置信度的临界值进行比较。如果 D 大于临界值,则观察到的分布与随机分布之间的差异很大。值越大,差异越大。
¥It is hard to judge the frequency tables are similar or different just by looking at them. So, we can use serval statistical tests to find out how much the frequency tables differ. We use Kolmogorov-Smirnov test.This method calculates cumulative probabilities for both distributions, and then compares the cumulative probabilities at each class level and selects the largest absolute difference D. Then, the test compares D to the critical value for a confidence level you specify. If D is greater than the critical value, the difference between the observed distribution and the random distribution is significant. The greater the value the bigger the difference.
传统上,在规则网格(方格网格)中,正方形用于表示方格的形状。一些研究人员建议,样方大小等于每个要素平均面积的两倍,平均面积等于研究区域面积除以要素数量。
¥Traditionally, squares are used for the shape of the quadrats, in a regular grid(square-grid). Some researchers suggest that the quadrat size equal twice the size of mean area per feature, which is simply the area of the study area divided by the number of features.
参数
¥Parameters
名称 | 类型 | 描述 |
---|---|---|
pointFeatureSet | FeatureCollection<点> | 要研究的点集 |
options? | 对象 | 可选参数(默认 {}) |
options.studyBbox? | [number, number, number, number | 表示研究区域的边界框 |
options.confidenceLevel? | 20 | 15 | 10 | 5 | 2 | 1 | 置信度。单位为百分比。5 表示 95%,该值必须在 K_TABLE 中(默认值为 20)。 |
返回
¥Returns
¥QuadratAnalysisResult result
示例
¥Examples
var bbox = [-65, 40, -63, 42];
var dataset = turf.randomPoint(100, { bbox: bbox });
var result = turf.quadratAnalysis(dataset);
安装
¥Installation
$ npm install @turf/quadrat-analysis
import { quadratAnalysis } from "@turf/quadrat-analysis";
const result = quadratAnalysis(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.quadratAnalysis(...);