Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install hiyenwong-ai-collection-collection-skills-gp-cake-brain-connectivitygit clone https://github.com/hiyenwong/ai_collection.gitcp ai_collection/SKILL.MD ~/.claude/skills/hiyenwong-ai-collection-collection-skills-gp-cake-brain-connectivity/SKILL.md---
name: gp-cake-brain-connectivity
version: 1.0.0
description: |
有效脑连接的因果核建模方法(GP CaKe)。结合积分-微分方程和因果核,
使用高斯过程回归非参数学习,实现因果推断。
触发词:有效连接、因果核、脑连接、高斯过程、GP CaKe、
effective connectivity, causal kernel, Gaussian process, brain connectivity。
---
# GP CaKe: Effective Brain Connectivity
## 核心方法论
### 问题定义
**目标:** 理解一个脑区的活动如何驱动其他脑区的活动(有效连接)
**解决方案:** 使用积分-微分方程和因果核建模因果交互
---
## 关键概念
### 1. 有效连接 vs 功能连接
| 类型 | 定义 | 方法 |
|------|------|------|
| **功能连接** | 统计相关性 | fMRI 相关分析 |
| **有效连接** | 因果影响 | GP CaKe, DCM |
### 2. 因果核
**数学表达:**
$$y(t) = \int_0^t K(\tau) x(t-\tau) d\tau + \epsilon(t)$$
其中:
- $y(t)$:目标脑区活动
- $x(t)$:源脑区活动
- $K(\tau)$:因果核(时间延迟影响)
- $\epsilon(t)$:噪声
### 3. GP CaKe 框架
**特点:**
- 高斯过程回归非参数学习
- 自回归建模的灵活性和可处理性
- 动态因果建模的生物物理可解释性
---
## 技术要点
### 因果协方差函数
**创新:** 构造新型因果协方差函数,强制执行因果核的期望性质
```
┌─────────────────────────────────────────────────────┐
│ GP CaKe 框架 │
├─────────────────────────────────────────────────────┤
│ │
│ 源脑区活动 x(t) │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ 因果核 K(τ) │ ← 高斯过程学习 │
│ │ (时间延迟) │ │
│ └──────┬──────┘ │
│ │ │
│ ▼ │
│ 积分-微分方程 │
│ │ │
│ ▼ │
│ 目标脑区活动 y(t) │
│ │
└─────────────────────────────────────────────────────┘
```
### 超参数的生物物理意义
| 超参数 | 生物物理意义 |
|--------|--------------|
| 时间尺度 | 神经响应持续时间 |
| 延迟 | 区域间传导时间 |
| 幅度 | 连接强度 |
---
## 应用场景
| 场景 | 说明 |
|------|------|
| **MEG/EEG 分析** | 高时间分辨率因果推断 |
| **fMRI 分析** | 区域间因果连接 |
| **脑网络建模** | 动态因果网络构建 |
| **临床应用** | 病理连接识别 |
---
## 性能优势
| 优势 | 说明 |
|------|------|
| **非参数** | 不预设核函数形状 |
| **可解释** | 超参数有生物物理意义 |
| **灵活** | 结合自回归和DCM优点 |
| **高效** | 高斯过程推断高效 |
---
## 技术实现
### Python 示例
```python
import numpy as np
import GPy
class GPCaKe:
def __init__(self, time_points, kernel_params):
self.time_points = time_points
# 因果协方差核
self.kernel = GPy.kern.RBF(input_dim=1) # 可替换为因果核
def fit(self, source_activity, target_activity):
"""
学习因果核
source_activity: 源脑区时间序列
target_activity: 目标脑区时间序列
"""
# 构造设计矩阵(卷积形式)
X = self._construct_design_matrix(source_activity)
# 高斯过程回归
self.gp_model = GPy.models.GPRegression(X, target_activity, self.kernel)
self.gp_model.optimize()
return self.gp_model
def predict(self, source_activity):
"""预测目标脑区响应"""
X = self._construct_design_matrix(source_activity)
return self.gp_model.predict(X)
def _construct_design_matrix(self, x):
"""构造积分-微分方程的设计矩阵"""
# 实现卷积结构
pass
```
### 因果核分析
```python
def analyze_causal_kernel(gp_model, time_delays):
"""
分析因果核的时间特性
返回:
- 峰值延迟
- 核宽度
- 因果强度
"""
kernel_values = gp_model.predict(time_delays)
peak_delay = time_delays[np.argmax(kernel_values)]
kernel_width = estimate_width(kernel_values)
causal_strength = np.max(kernel_values)
return {
'peak_delay': peak_delay,
'width': kernel_width,
'strength': causal_strength
}
```
---
## 与其他方法对比
| 方法 | 参数化 | 可解释性 | 灵活性 |
|------|--------|----------|--------|
| Granger 因果 | 参数化 | 中等 | 低 |
| DCM | 参数化 | 高 | 低 |
| **GP CaKe** | 非参数 | 高 | 高 |
---
## 相关技能
- `time-varying-brain-connectivity` - 时变脑网络分析
- `ccep-causal-brain-network` - 因果脑网络研究
---
## 来源
- **论文:** GP CaKe: Effective brain connectivity with causal kernels
- **arXiv:** 1705.05603
- **效用评分:** 0.96
- **学习日期:** 2026-03-21
## Activation Keywords
- 脑网络分析
- 神经科学方法
- 计算神经科学
- 脑连接建模
## Tools Used
- **read**: Read skill documentation and references
- **exec**: Run analysis scripts and data processing
- **web_fetch**: Fetch papers and resources
## Instructions for Agents
1. Read the skill documentation carefully
2. Understand the methodology and key concepts
3. Apply the techniques to the specific problem
4. Document results and insights
## Examples
```python
# Example usage of the skill methodology
# Refer to the Technical Implementation section for details
```