SuperAPI AI 工具集

correlation-explorer

数据与分析

查看项目

更新于 10-15 21:10

技能介绍

用途:分析 CSV/Excel 数据集中变量之间的相关性,用于数据探索、特征选择或识别列间关系。

主要能力:计算所有变量两两之间的相关矩阵;生成颜色编码的热力图;提供相关性的 P 值显著性检验;支持 Pearson、Spearman、Kendall 三种相关方法;查找强相关变量对;分析与指定目标变量的相关性;支持导出 CSV 与 JSON。

使用方式:可通过 Python API 或命令行调用。Python 示例:from correlation_explorer import CorrelationExplorer;explorer = CorrelationExplorer();explorer.load_csv("sales_data.csv");matrix = explorer.correlation_matrix();strong = explorer.find_strong_correlations(threshold=0.7);explorer.plot_heatmap("correlation_heatmap.png")。命令行示例:python correlation_explorer.py --input data.csv --output correlations.csv;python correlation_explorer.py --input data.csv --heatmap heatmap.png;python correlation_explorer.py --input data.csv --strong --threshold 0.7;python correlation_explorer.py --input data.csv --target sales;python correlation_explorer.py --input data.csv --method spearman;python correlation_explorer.py --input data.csv --pvalues。

方法选择:pearson 适合线性关系与正态数据;spearman 适合非线性或有序数据;kendall 适合小样本或有序数据且对异常值稳健。

适用场景:特征选择(找出与目标相关或高度共线的特征)、销售分析(识别驱动营收的因素)、通用数据探索(发现显著相关关系)。

依赖:pandas>=2.0.0、numpy>=1.24.0、scipy>=1.10.0、matplotlib>=3.7.0、seaborn>=0.12.0。

限制:资料未提供安装命令、收费方式、平台支持范围及性能上限等信息。