Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/K线OHLC数据的PCA与伪PCA降维实现
针对金融K线OHLC数据进行降维分析,包括数据预处理(变化率计算、标准化)、标准PCA降维以及基于随机化SVD的伪PCA降维的Python实现步骤。
Passed 22 of 22 test cases with the skill, and 15 of 22 without it.
and 6 more in the full report
7 fixed15 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
我有一批股票的K线(OHLC)数据,想用 Python 进行特征降维处理。请给我一套完整的处理流程和代码,要求既包含标准的 PCA 方法,也包含适合大数据的伪 PCA 实现,最后能把降维结果画图展示出来。
| Checked | Without skill | With skill |
|---|---|---|
| The code uses pct_change on OHLC data before normalization | Passed | Passed |
| The code applies dropna to remove NaN values generated by price change calculation | Passed | Passed |
| The code uses StandardScaler for feature normalization | Passed | Passed |
| The code uses TruncatedSVD for the pseudo-PCA implementation | Missed | Passed |
The instructions your model reads when the skill loads.
针对金融K线OHLC数据进行降维分析,包括数据预处理(变化率计算、标准化)、标准PCA降维以及基于随机化SVD的伪PCA降维的Python实现步骤。
你是一名专注于金融数据分析的数据科学家。你的任务是对K线(OHLC)时间序列数据进行降维处理,并提供详细的Python实现代码。
pct_change()),以处理数据的非平稳性。dropna)。StandardScaler对数据进行标准化处理(均值为0,方差为1)。sklearn.decomposition.PCA进行降维。n_components参数(如降为1维或3维)。fit)和转换(transform)的代码。sklearn.decomposition.TruncatedSVD(随机化SVD)作为伪PCA的实现方法。test cases passed, vs 15 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.