Skip to content

Commit

Permalink
docs(ava/insight): provide instruction about Insight Extractors
Browse files Browse the repository at this point in the history
  • Loading branch information
LAI-X authored and chenluli committed Mar 5, 2024
1 parent 2ac536d commit 95d413b
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
14 changes: 14 additions & 0 deletions site/docs/api/insight/auto-insights.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ Run different algorithms from multi-dimensional data to discover interesting pat
| algorithmParameter | `AlgorithmParameter` | Adjustable algorithm parameters | none |
| dataProcessInfo | `Extra` | Configuration of data processing during data verification | none |

* ***InsightType*** Supported Insight Types

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.

| Type | Name | Algorithm | Description |
| ----| ---- | ---- | ---- |
| `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. |
| `change_point ` | Change Point Detection | [Bayesian Online Changepoint Detection](https://arxiv.org/pdf/0710.3742.pdf) | Detect change points in time series. |
| `majority ` | Majority Detection | proportion limits | Detect the outstanding indicators of data. |
| `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. |
| `category_outlier ` | Category Outlier Detection | [IQR](https://en.wikipedia.org/wiki/IQR) | Detect category outliers in the data. |
| `time_series_outlier ` | Time Series Outlier Detection| [STL decomposition](https://otexts.com/fpp2/stl.html) | Detect outlier points in time series. |
| ` 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. |

* ***AlgorithmParameter*** Adjustable algorithm parameters

| Properties | Type | Description | Default|
Expand Down
14 changes: 14 additions & 0 deletions site/docs/api/insight/auto-insights.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ order: 1
| algorithmParameter | `AlgorithmParameter` | 可调的算法参数 ||
| dataProcessInfo | `Extra` | 数据校验时数据处理的配置 ||

* ***InsightType*** 支持的洞察类型

算子类型共有7种,默认情况下会运行每一个算法来返回洞察结果,也可设置InsightOptions['insightTypes']参数指定参与计算的洞察类型。

| 类型值 | 名称 | 算法 | 描述 |
| ----| ---- | ---- | ---- |
| `trend ` | 趋势检测 | [Mann-Kendall 检验](https://cran.r-project.org/web/packages/trend/vignettes/trend.pdf#page=2) | 检测时间序列数据在某一指标上是否存在显著增加或者减少。 |
| `change_point ` | 突变点检测 | [贝叶斯在线变点检测](https://arxiv.org/pdf/0710.3742.pdf) | 检测在时间序列中某一属性发生的突变。 |
| `majority ` | 显著性检测 | 限制比例 | 检测数据分布的显著性,判断是否有突出的数据指标。 |
| `low_variance ` | 低方差检测 | [变异系数](https://zh.wikipedia.org/zh-hans/%E5%8F%98%E5%BC%82%E7%B3%BB%E6%95%B0) | 检测数据分布的均匀性,判断数据点是否分布在均值附近。 |
| `category_outlier ` | 类别异常检测 | [ IQR ](https://zh.wikipedia.org/wiki/%E5%9B%9B%E5%88%86%E4%BD%8D%E8%B7%9D) | 检测数据中的异常类别。 |
| `time_series_outlier ` | 时间序列异常检测 | [STL 分解](https://otexts.com/fpp2/stl.html) | 检测在时间序列中的异常点。 |
| ` 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) |检测两个序列之间是否存在相关关系。 |

* ***AlgorithmParameter*** 可调的算法参数

| 属性 | 类型 | 描述 | 默认值 |
Expand Down
30 changes: 30 additions & 0 deletions site/docs/guide/insight/intro.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,36 @@ getInsights(data, {
});
```

Customize insight types by the ***insightTypes*** attribute. Detailed parameters are described in the [getInsights API](../../api/insight/auto-insight.en.md).

```ts
import { getInsights } from '@antv/ava';

getInsights(data, {
limit: 10,
insightTypes: ['trend', 'time_series_outlier']
});
```

Customize impact measures and weights by setting up ***impactMeasures*** and ***impactWeight***.

```ts
import { getInsights } from '@antv/ava';

getInsights(data, {
limit: 10,
// set the measures of the impact score
impactMeasures: [
{ fieldName: 'life_expect', method: 'COUNT' },
{ fieldName: 'pop', method: 'COUNT' },
{ fieldName: 'fertility', method: 'COUNT' },
],
// adjust the calculation weight of the relevant factors (significance, impact)
// in the calculation of the insight score.
impactWeight: 0.5,
});
```

### insightPatternsExtractor Usage

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).
Expand Down
30 changes: 30 additions & 0 deletions site/docs/guide/insight/intro.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,36 @@ getInsights(data, {
});
```

通过配置 ***insightTypes*** 属性指定计算的洞察类型,具体内容详见 [getInsights API](../../api/insight/auto-insights.zh.md)

```ts
import { getInsights } from '@antv/ava';

getInsights(data, {
limit: 30,
insightTypes: ['trend', 'time_series_outlier']
});
```

使用 ***impactMeasures******impactWeight*** 属性来自定义影响力指标和权重。

```ts
import { getInsights } from '@antv/ava';

getInsights(data, {
limit: 10,
// 自定义影响力(Impact)分数的计算指标
impactMeasures: [
{ fieldName: 'life_expect', method: 'COUNT' },
{ fieldName: 'pop', method: 'COUNT' },
{ fieldName: 'fertility', method: 'COUNT' },
],
// 自定义影响力(Impact)分数在洞察分数中的权重(0 ~ 1)
impactWeight: 0.5,
});
```


### insightPatternsExtractor 使用

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

0 comments on commit 95d413b

Please sign in to comment.