‹ 首页

score-covariance-estimate

@microprediction · 收录于 2 天前 · 上游提交 1 个月前

Score and compare covariance estimates with precise's assessor panel. Use when you need to judge an estimate out-of-sample or rank competing estimators — and especially in high dimensions, where the plain held-out likelihood is misleading.

适合你,如果你需要评估或比较不同协方差估计方法的准确性。

/ 通过 npx 安装 校验哈希
npx oh-my-skill add microprediction/precise/score-covariance-estimate
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- microprediction/precise/score-covariance-estimate
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify microprediction/precise/score-covariance-estimate
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
333GitHub stars
~512上下文体积 · 单文件
索引托管

怎么用

商店整理自技能原文 · 版本 d89c883 · 表述以原文为准
它做什么

使用precise库的assessor面板为协方差估计打分并排序,分数越高越好。需要提供测试数据或真实协方差(仅模拟)。

什么时候触发

当需要判断协方差估计的样本外表现,或排序多个竞争估计时触发。尤其适合高维数据(维度接近样本量)。

装好后可以这样说
适用于高维情况。
仅限模拟数据。
低维时最优。
技能原文 SKILL.md作者撰写 · MIT · d89c883

Score / rank covariance estimates

from precise import all_assessors, assessor_from_name

for A in all_assessors():
    s = A().score(cov, X_test=X_test, true_cov=Sigma_true)   # higher = better
  • cov is the estimate to judge; X_test is held-out data (rows = observations); true_cov is the population covariance (only available in simulation).
  • Each assessor exposes needs_data and needs_truth; pass what it needs. Truth-free assessors work on real data, truth-requiring ones (e.g. FrobeniusToTruth) only in simulation.
  • All assessors follow higher = better, so you can rank or argmax directly.
The one rule that matters in high dimensions

Do not rank estimators by the held-out Gaussian log-likelihood when p is comparable to n. The likelihood is dominated by the smallest, unidentifiable eigenvalues of the estimate; empirically it ranks estimators below chance in that regime. Instead use inversion-free or block judges:

| Regime / goal | Use | |---|---| | low dimension, well-conditioned | LogLikelihood (it is optimal here) | | high dimension (p/n near 1 or larger) | BlockPseudoLikelihood, SchurLikelihood, VariogramScore, FrobeniusToTruth (sim only) | | economic / portfolio relevance | GMVVariance (out-of-sample minimum-variance variance) | | forecasting a variance from a noisy proxy | a QLIKE / Bregman-consistent loss, not RMSE on the proxy — RMSE on a noisy variance proxy can rank inconsistently |

SchurLikelihood(gamma=...) is a tunable bridge: gamma=1 is the full likelihood (fragile in high-d), gamma=0 the robust block-diagonal one, interior values better-conditioned than either.

Don't over-read the numbers
  • Rankings are ensemble-sensitive: a result on one data-generating process need not transfer. If the conclusion matters, sweep several generators and report per-regime (see the assess-covariance-method skill).
  • A lower point error (RMSE) is not a tradable or actionable signal by itself.
  • If you attach significance to a ranking, the loss differentials are usually dependent (overlapping windows, correlated assets); naive standard errors overstate significance — see the inference section of the assess-covariance-method skill.
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。