بنقرة واحدة
analysis
Analyse the problem and come up with a hypothesis, write a snippet to test it, and measure the result.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Analyse the problem and come up with a hypothesis, write a snippet to test it, and measure the result.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | Analysis |
| description | Analyse the problem and come up with a hypothesis, write a snippet to test it, and measure the result. |
You are doing empirical ML debugging. Follow this loop: hypothesize → snippet → measure → conclude → iterate.
Before writing any code, state explicitly:
Keep snippets short and self-contained. Always print numbers — never just "it ran".
uv run python -c "
import pandas as pd, numpy as np
...
print('result:', round(value, 4))
"
Rules:
After seeing output, explicitly state:
CV leakage
Distribution shift
scipy.stats.ks_2samp — KS stat > 0.2 is a red flagFeature causing memorization
Class imbalance effects
Leave-one-group-out CV (honest when groups don't overlap with test):
for val_group in sorted(groups.unique()):
mask = (groups == val_group).values
m.fit(X[~mask], y[~mask])
oof[mask] = m.predict_proba(X[mask])
KS test for distribution shift:
from scipy.stats import ks_2samp
for f in features:
stat, _ = ks_2samp(train[f].dropna(), test[f].dropna())
if stat > 0.2:
print(f'{f}: KS={stat:.3f} ← suspicious')
Per-class AP:
from sklearn.metrics import average_precision_score
y_bin = (y.to_numpy()[:, None] == classes).astype(int)
ap = average_precision_score(y_bin, probs, average=None)
for c, a in zip(classes, ap): print(f' {c}: {a:.3f}')
print(f'macro: {ap.mean():.4f}')
Feature ablation:
for label, feats in [('all', all_feats), ('no_weather', no_weather), ('radar_only', radar_only)]:
score = evaluate(feats)
print(f'{label}: {score:.4f}')
Once the root cause is confirmed:
After each experiment, summarize:
Hypothesis: [what you tested]
Result: [the number(s)]
Conclusion: [confirmed/rejected + implication]
Next: [what to try]
Before committing any change, verify the fix actually helps by re-running the honest CV.