用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill run2-parameter-optimization-strategy命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Handles reading, populating, and saving .docx files using the python-docx library. Use this skill for any tasks involving template filling or modifying Word documents.
Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
This skill includes search capability in 13F, such as fuzzy search a fund information using possibly inaccurate name, or fuzzy search a stock cusip info using its name.
基于 SOC 职业分类
正在显示 SKILL.md
| name | run2_parameter-optimization-strategy |
| description | Systematic parameter search strategies for GLM calibration with multiple metrics |
GLM has 5 calibration parameters to optimize across 3 RMSE metrics with tight thresholds:
Brute force grid search becomes expensive quickly (10^5 combinations at 5-10 minutes each).
Before optimization, run one baseline simulation and diagnose:
def diagnose_baseline():
"""Identify which metrics fail and by how much"""
metrics = compute_metrics()
failures = {}
for key, threshold in THRESHOLDS.items():
if metrics[key] >= threshold:
gap = metrics[key] - threshold
failures[key] = gap
return metrics, failures
# Example diagnosis:
# overall_rmse: 7.421 (gap: +5.821)
# annual_deep_rmse: 8.022 (gap: +6.472) ← Largest error
# summer_deep_rmse: 10.949 (gap: +9.249) ← Worst metric
Before systematic search, use physical reasoning:
If all metrics show overestimation of temperatures (sim > obs):
ch (sensible heat transfer)lw_factor (longwave radiation)Kw (more opaque water)If simulation shows stratification issues:
coef_mix_hyp (less hypolimnetic mixing)coef_mix_hyp (more mixing)wind_factorIf annual_deep_rmse >> overall_rmse:
coef_mix_hyp primarily, possibly KwIf summer_deep_rmse is worst:
wind_factor or coef_mix_hyp issuesDon't search all 5 parameters simultaneously. Use sequential focusing:
Start with 2-3 parameters showing largest physical effects:
# Example: Cooling-focused search
test_configs = []
for ch in [0.0015, 0.0017, 0.0019, 0.002]: # Heat loss
for lw_factor in [0.7, 0.85, 1.0]: # Atmospheric heating
for kw in [0.1, 0.2, 0.3]: # Light penetration
# Keep other parameters at baseline
test_configs.append({
('meteorology', 'ch'): ch,
('meteorology', 'lw_factor'): lw_factor,
('light', 'Kw'): kw,
('mixing', 'coef_mix_hyp'): 0.5, # Default
('meteorology', 'wind_factor'): 1.0 # Default
})
# Total: 4 × 3 × 3 = 36 tests
Once best Tier 1 parameters identified, optimize secondary:
# Keep best from Tier 1, vary mixing and wind
best_ch = 0.0019
best_lw = 0.85
best_kw = 0.2
for coef_mix_hyp in [0.3, 0.4, 0.5, 0.6, 0.7]:
for wind_factor in [0.8, 0.9, 1.0, 1.1, 1.2]:
test_configs.append({
('meteorology', 'ch'): best_ch,
('meteorology', 'lw_factor'): best_lw,
('light', 'Kw'): best_kw,
('mixing', 'coef_mix_hyp'): coef_mix_hyp,
('meteorology', 'wind_factor'): wind_factor
})
# Total: 5 × 5 = 25 tests
Identify parameters most affecting each metric:
def compute_sensitivity(baseline_params, param_to_vary, values):
"""Test parameter range, return sensitivity"""
rmse_results = {name: [] for name in ['overall', 'annual_deep', 'summer_deep']}
for value in values:
test_params = baseline_params.copy()
test_params[param_to_vary] = value
metrics = test_parameter_set(test_params)
rmse_results['overall'].append(metrics['overall_rmse'])
rmse_results['annual_deep'].append(metrics['annual_deep_rmse'])
rmse_results['summer_deep'].append(metrics['summer_deep_rmse'])
# Compute sensitivity (change in RMSE / change in parameter)
return rmse_results
Focus on: Kw, lw_factor, ch (temperature regulation)
Focus on: coef_mix_hyp (deep water mixing), Kw
Focus on: coef_mix_hyp, wind_factor (stratification in warm season)
def optimize():
print("1. Baseline diagnosis...")
metrics, failures = diagnose_baseline()
if all(m < t for m, t in zip(metrics.values(), THRESHOLDS.values())):
print("✓ All metrics already meet thresholds!")
return metrics
print(f"\n2. Identifying main issues...")
if failures['summer_deep_rmse'] > 5: # Large error
print(" Focus: summer stratification and deep mixing")
# Run Tier 1 with coef_mix_hyp, wind_factor emphasis
print(f"\n3. Running focused grid search...")
best_metrics = run_tier1_optimization()
print(f"\n4. Refining with Tier 2...")
final_metrics = run_tier2_optimization(best_metrics)
return final_metrics
Stop optimization when:
Some parameter combinations interact:
ch × lw_factor: Both affect surface heat balancecoef_mix_hyp × wind_factor: Both affect stratification strengthKw × coef_mix_hyp: Light penetration affects density gradients, which interact with mixingConsider this when choosing next test after each tier.