!!!###!!!title=Auto Insight——VisActor/VMind tutorial documents!!!###!!!!!!###!!!description=In the era of data-driven decision-making, charts serve as a core tool for data visualization, providing an intuitive way to present complex data relationships. However, relying solely on human observation and analysis of charts often makes it difficult to quickly and comprehensively uncover the hidden insights behind the data.This tutorial will introduce you to the intelligent insights feature in VMind, demonstrating how to quickly obtain various types of insights from charts using the `getInsights` function, along with some examples.!!!###!!!
Intelligent Insights
In the era of data-driven decision-making, charts serve as a core tool for data visualization, providing an intuitive way to present complex data relationships. However, relying solely on human observation and analysis of charts often makes it difficult to quickly and comprehensively uncover the hidden insights behind the data.
This tutorial will introduce you to the intelligent insights feature in VMind, demonstrating how to quickly obtain various types of insights from charts using the getInsights function, along with some examples.
getInsights
The getInsights function in VMind is a powerful tool that helps you extract chart insights and generate semantic explanations. This function requires the following two parameters:
spec: The specific spec configuration of the current VChart chart
options (DataInsightOptions): Insight-related configurations that control the number of specific insights, the algorithms used, and the specific configurations of the corresponding algorithms
During the process of generating intelligent insights, VMind primarily performs two tasks:
First, it uses built-in statistical algorithms to extract data insights contained in the current chart;
Then, these identified insights are passed to a large model, which polishes and semantically explains these insights. During the polishing process, VMind passes field information and insight types to the large model but does not pass any data details to the large model.
The second step of polishing by the large model is not mandatory and can be disabled through options.usePolish, in which case you will receive data insights and templated semantic content.
Built-in Algorithms
Currently, VMind's built-in algorithms are primarily related to statistics, as listed below:
LOF (Local Outlier Factor) for local outlier detection
zScore for global outlier detection
IQR (Interquartile Range) for global outlier detection
Page-Hinkley Test for time series anomaly detection
Bayesian Inference for change point detection
Mann-Kendall Test for trend detection
Pearson Correlation Coefficient / Spearman Correlation for correlation detection
DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm
Coefficient of Variation for periodicity detection based on the coefficient of variation
Basic statistical indicators, such as maximum/minimum/average value/proportion anomalies, etc.
Large Model Polishing
In intelligent insights, the large model serves only as a text polishing function, enhancing the readability of the final results, and is an optional configuration.
Insight Types
Based on the existing built-in algorithms, VMind can identify the following 9 types of insights:
Outliers
Time series outliers
Change points
Points with significant contribution to proportion
Anomalous intervals
Overall trends
Anomalous trends
Correlations
Basic statistical indicators
Depending on different insight results, users can choose different annotation/highlighting methods to present them in charts.
The final result accurately identifies the overall trend and the significantly anomalous college admission rate in 1985.
Return Structure
Taking the overall trend as an example, the structured content returned is as follows:
const outlierInsight = {
/** Type is outlier Insight */ type: 'outlier',
/** Specific outlier data */ data: [
{
index: 8,
dataItem: {
Year: 1985,
College Admission Rate: 0.96,
}
}
],
/** Numerical field */ fieldId: 'College Admission Rate',
/** Current outlier value */ value: 0.96,
/** Insight confidence score */ significant: 1,
/** Current series name, since the current chart does not have a seriesField configuration, it only contains one series, so it is the default value of vmind */ seriesName: 'vmind_default_series',
/** Detected by the pageHinkley algorithm */ name: 'pageHinkley',
/** Specific textual meaning */ textContent: {
/** Specific text template */ content: '${b} period shows a significant anomaly, with a value of ${c}.',
/** Variable parsing in the template */ variables: {
b: {
isDimValue: true,
value: 1985,
fieldName: 'Year'
},
c: {
value: 0.96,
isMeasure: true,
fieldName: 'College Admission Rate'
}
},
/** Result of directly replacing template variables with values */ plainText: '1985 period shows a significant anomaly, with a value of 0.96.'
}
}
Adding Insights
After identifying chart insights, we can use VChart's powerful annotation capabilities to add these contents to the chart, as shown in the final effect below:
Parameter Details
For detailed parameter explanations, see: getInsights