pymc-bayesian-modeling
ابنِ نماذج بايزية باستخدام PyMC
متاح أيضًا من: davila7
ابنِ وملاءم وتحقق من النماذج البايزية باستخدام PyMC. أنشئ نماذج هرمية، وشغّل أخذ عينات MCMC، وقارن النماذج باستخدام مقاييس LOO وWAIC.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "pymc-bayesian-modeling". Build a Bayesian linear regression with predictors X1, X2 and outcome y
النتيجة المتوقعة:
- Model: alpha ~ Normal(0,1), beta ~ Normal(0,1), sigma ~ HalfNormal(1)
- Posterior means with 95% credible intervals
- R-hat values all below 1.01 indicating convergence
- Posterior predictive checks showing model fit
استخدام "pymc-bayesian-modeling". Create a hierarchical model with 10 groups and 50 observations each
النتيجة المتوقعة:
- Population-level hyperparameters: mu_alpha, sigma_alpha, mu_beta, sigma_beta
- Group-level parameters showing shrinkage toward population mean
- Trace plots confirming good mixing
- Comparison of group intercepts with forest plot
استخدام "pymc-bayesian-modeling". Compare three model specifications using LOO
النتيجة المتوقعة:
- LOO comparison table with rank, elpd_loo, and weights
- Pareto-k diagnostics for each model
- Recommendation for best model with interpretation
- Model-averaged predictions if models are similar
التدقيق الأمني
آمنAll 383 static findings are false positives. The 'weak cryptographic algorithm' detections flag legitimate PyMC probability distributions. The 'external_commands' findings flag markdown backtick syntax. This is a legitimate scientific computing skill for Bayesian statistical modeling.
عوامل الخطر
⚙️ الأوامر الخارجية (4)
📁 الوصول إلى نظام الملفات (2)
درجة الجودة
ماذا يمكنك بناءه
تقدير عدم اليقين
كمّن عدم اليقين في معاملات الانحدار والتنبؤات باستخدام التوزيعات البعدية كاملة.
تحليل البيانات الهرمية
حلّل البيانات المجمّعة أو المتداخلة مع التجميع الجزئي عبر المجموعات.
مقارنة النماذج
قارن النماذج الإحصائية المتنافسة باستخدام التحقق المتقاطع LOO وأوزان النماذج.
جرّب هذه الموجهات
Build a Bayesian linear regression model using PyMC with the following predictors and outcome variable. Include prior predictive checks, sample the posterior using NUTS, and check convergence diagnostics.
Create a hierarchical Bayesian model for data with group structure. Use non-centered parameterization to avoid sampling issues. Show group-level estimates and shrinkage toward the population mean.
Fit two or more Bayesian models to the same data and compare them using LOO. Report the model weights and provide interpretation guidelines for the comparison results.
Run a complete Bayesian analysis workflow including data preparation, model building, prior predictive checks, MCMC sampling with 4 chains, convergence diagnostics, posterior predictive checks, and predictions for new data.
أفضل الممارسات
- قم بتقييس المتنبئات قبل النمذجة لتحسين كفاءة أخذ العينات
- استخدم سوابق ضعيفة الإبلاغ بدلًا من السوابق المسطحة للحصول على استدلال أفضل
- احرص دائمًا على إجراء فحوصات تنبؤية قبلية قبل الملاءمة للتحقق من السوابق
- تحقق من مؤشرات التقارب (R-hat < 1.01, ESS > 400, no divergences) قبل تفسير النتائج
تجنب
- استخدام سوابق مسطحة (Uniform(0, 1e10)) بدلًا من سوابق إبلاغية
- تفسير النتائج دون التحقق من مؤشرات التقارب
- استخدام تمثيل متمركز للنماذج الهرمية (يسبب تباعدات)
- ملاءمة نماذج معقدة دون فحوصات تنبؤية قبلية