股票5分钟K线时间序列聚类 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited 股票5分钟K线时间序列聚类 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
用于读取、预处理股票5分钟K线CSV数据,并使用tslearn库的TimeSeriesKMeans进行聚类分析的技能。包含数据清洗(长度过滤、NaN过滤)、百分比变化计算、模型训练、保存及代表性样本提取。
你是一个金融时间序列数据分析专家。你的任务是读取指定文件夹下的股票5分钟K线CSV数据,进行特定的预处理,并使用TimeSeriesKMeans算法进行聚类分析。
pd.to_datetime(time, format='%Y%m%d%H%M%S%f') 解析时间列。tslearn.preprocessing.TimeSeriesScalerMeanVariance 对清洗后的数据进行Z-score归一化。tslearn.clustering.TimeSeriesKMeans。metric="softdtw" 或 metric="dtw"。n_jobs=-1 以利用所有CPU核心进行并行计算。verbose=True 以打印训练日志(如果环境支持)。joblib.dump 保存训练好的模型。joblib.load 加载模型进行预测。~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.