Skip to content

Commit 95d413b

Browse files
LAI-Xchenluli
authored andcommitted
docs(ava/insight): provide instruction about Insight Extractors
1 parent 2ac536d commit 95d413b

File tree

4 files changed

+88
-0
lines changed

4 files changed

+88
-0
lines changed

site/docs/api/insight/auto-insights.en.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ Run different algorithms from multi-dimensional data to discover interesting pat
3030
| algorithmParameter | `AlgorithmParameter` | Adjustable algorithm parameters | none |
3131
| dataProcessInfo | `Extra` | Configuration of data processing during data verification | none |
3232

33+
* ***InsightType*** Supported Insight Types
34+
35+
The extractor types used by Insight are set by the ***insightTypes*** property in the configuration. There are 7 extractor types in total, and by default, Insight will run each algorithm to provide the results.
36+
37+
| Type | Name | Algorithm | Description |
38+
| ----| ---- | ---- | ---- |
39+
| `trend ` | Trend Detection | [Mann-Kendall test](https://cran.r-project.org/web/packages/trend/vignettes/trend.pdf#page=2) | Detect significant increases or decreases in time series. |
40+
| `change_point ` | Change Point Detection | [Bayesian Online Changepoint Detection](https://arxiv.org/pdf/0710.3742.pdf) | Detect change points in time series. |
41+
| `majority ` | Majority Detection | proportion limits | Detect the outstanding indicators of data. |
42+
| `low_variance ` | Low Variance Detection | [coefficient of variation](https://en.wikipedia.org/wiki/Coefficient_of_variation) | Detect the uniformity and determine if data points are distributed around the mean value. |
43+
| `category_outlier ` | Category Outlier Detection | [IQR](https://en.wikipedia.org/wiki/IQR) | Detect category outliers in the data. |
44+
| `time_series_outlier ` | Time Series Outlier Detection| [STL decomposition](https://otexts.com/fpp2/stl.html) | Detect outlier points in time series. |
45+
| ` correlation` | Correlation Detection | [Pearson product-moment correlation coefficient](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient) | Detect if there is a correlation between two sequences of data. |
46+
3347
* ***AlgorithmParameter*** Adjustable algorithm parameters
3448

3549
| Properties | Type | Description | Default|

site/docs/api/insight/auto-insights.zh.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ order: 1
3333
| algorithmParameter | `AlgorithmParameter` | 可调的算法参数 ||
3434
| dataProcessInfo | `Extra` | 数据校验时数据处理的配置 ||
3535

36+
* ***InsightType*** 支持的洞察类型
37+
38+
算子类型共有7种,默认情况下会运行每一个算法来返回洞察结果,也可设置InsightOptions['insightTypes']参数指定参与计算的洞察类型。
39+
40+
| 类型值 | 名称 | 算法 | 描述 |
41+
| ----| ---- | ---- | ---- |
42+
| `trend ` | 趋势检测 | [Mann-Kendall 检验](https://cran.r-project.org/web/packages/trend/vignettes/trend.pdf#page=2) | 检测时间序列数据在某一指标上是否存在显著增加或者减少。 |
43+
| `change_point ` | 突变点检测 | [贝叶斯在线变点检测](https://arxiv.org/pdf/0710.3742.pdf) | 检测在时间序列中某一属性发生的突变。 |
44+
| `majority ` | 显著性检测 | 限制比例 | 检测数据分布的显著性,判断是否有突出的数据指标。 |
45+
| `low_variance ` | 低方差检测 | [变异系数](https://zh.wikipedia.org/zh-hans/%E5%8F%98%E5%BC%82%E7%B3%BB%E6%95%B0) | 检测数据分布的均匀性,判断数据点是否分布在均值附近。 |
46+
| `category_outlier ` | 类别异常检测 | [ IQR ](https://zh.wikipedia.org/wiki/%E5%9B%9B%E5%88%86%E4%BD%8D%E8%B7%9D) | 检测数据中的异常类别。 |
47+
| `time_series_outlier ` | 时间序列异常检测 | [STL 分解](https://otexts.com/fpp2/stl.html) | 检测在时间序列中的异常点。 |
48+
| ` correlation` | 相关性检测 | [Pearson 积矩相关检验](https://zh.wikipedia.org/wiki/%E7%9A%AE%E5%B0%94%E9%80%8A%E7%A7%AF%E7%9F%A9%E7%9B%B8%E5%85%B3%E7%B3%BB%E6%95%B0?wprov=srpw1_0) |检测两个序列之间是否存在相关关系。 |
49+
3650
* ***AlgorithmParameter*** 可调的算法参数
3751

3852
| 属性 | 类型 | 描述 | 默认值 |

site/docs/guide/insight/intro.en.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,36 @@ getInsights(data, {
4040
});
4141
```
4242

43+
Customize insight types by the ***insightTypes*** attribute. Detailed parameters are described in the [getInsights API](../../api/insight/auto-insight.en.md).
44+
45+
```ts
46+
import { getInsights } from '@antv/ava';
47+
48+
getInsights(data, {
49+
limit: 10,
50+
insightTypes: ['trend', 'time_series_outlier']
51+
});
52+
```
53+
54+
Customize impact measures and weights by setting up ***impactMeasures*** and ***impactWeight***.
55+
56+
```ts
57+
import { getInsights } from '@antv/ava';
58+
59+
getInsights(data, {
60+
limit: 10,
61+
// set the measures of the impact score
62+
impactMeasures: [
63+
{ fieldName: 'life_expect', method: 'COUNT' },
64+
{ fieldName: 'pop', method: 'COUNT' },
65+
{ fieldName: 'fertility', method: 'COUNT' },
66+
],
67+
// adjust the calculation weight of the relevant factors (significance, impact)
68+
// in the calculation of the insight score.
69+
impactWeight: 0.5,
70+
});
71+
```
72+
4373
### insightPatternsExtractor Usage
4474

4575
If you only want to get insights of a specific type, `insightPatternsExtractor` will be your first choice. Detailed input and output parameters are described in the [insightPatternsExtractor API](../../api/insight/insight-patterns-extractor.en.md).

site/docs/guide/insight/intro.zh.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,36 @@ getInsights(data, {
4141
});
4242
```
4343

44+
通过配置 ***insightTypes*** 属性指定计算的洞察类型,具体内容详见 [getInsights API](../../api/insight/auto-insights.zh.md)
45+
46+
```ts
47+
import { getInsights } from '@antv/ava';
48+
49+
getInsights(data, {
50+
limit: 30,
51+
insightTypes: ['trend', 'time_series_outlier']
52+
});
53+
```
54+
55+
使用 ***impactMeasures******impactWeight*** 属性来自定义影响力指标和权重。
56+
57+
```ts
58+
import { getInsights } from '@antv/ava';
59+
60+
getInsights(data, {
61+
limit: 10,
62+
// 自定义影响力(Impact)分数的计算指标
63+
impactMeasures: [
64+
{ fieldName: 'life_expect', method: 'COUNT' },
65+
{ fieldName: 'pop', method: 'COUNT' },
66+
{ fieldName: 'fertility', method: 'COUNT' },
67+
],
68+
// 自定义影响力(Impact)分数在洞察分数中的权重(0 ~ 1)
69+
impactWeight: 0.5,
70+
});
71+
```
72+
73+
4474
### insightPatternsExtractor 使用
4575

4676
如果只想获取指定类型的洞察结果,那么`insightPatternsExtractor`将是你的首选。输入输出参数详见 [insightPatternsExtractor API](../../api/insight/insight-patterns-extractor.zh.md)

0 commit comments

Comments
 (0)