<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>时间之间</title>
        <link>https://tangly1024.com/</link>
        <description>“每日都是新的，此事明日说吧。”</description>
        <lastBuildDate>Mon, 18 May 2026 02:59:33 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2026, 浮森黑子</copyright>
        <item>
            <title><![CDATA[支持向量机(SVM)分类实用指南]]></title>
            <link>https://tangly1024.com/article/ML_SVM</link>
            <guid>https://tangly1024.com/article/ML_SVM</guid>
            <pubDate>Wed, 12 Nov 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2a9cfca7820c80deabaed5736dca6ebc"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2a9cfca7820c80229564e913226099b2" data-id="2a9cfca7820c80229564e913226099b2"><span><div id="2a9cfca7820c80229564e913226099b2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c80229564e913226099b2" title="总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>总结</b></span></span></h2><div class="notion-text notion-block-2a9cfca7820c802ca13cef713839d1a8">使用SVM进行分类，需要注重数据的预处理、选择适合的核函数和调节合适的超参数。根据本文的介绍，初学者可以迅速获得一个较好的分类效果，但要注意避免数据缩放错误、过拟合问题以及选择不适当的核函数。最终，交叉验证和网格搜索是优化SVM模型的重要工具，能帮助你找到最适合的数据和参数组合。</div><blockquote class="notion-quote notion-block-2a9cfca7820c8027bd01ec3543fd35cc"><div>原文链接1：<a class="notion-link" href="https://www.csie.ntu.edu.tw/~cjlin/libsvm/" target="_blank" rel="noopener noreferrer">https://www.csie.ntu.edu.tw/~cjlin/libsvm/</a>
原文链接2：<a class="notion-link" href="https://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf" target="_blank" rel="noopener noreferrer">https://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf</a></div></blockquote><hr class="notion-hr notion-block-2a9cfca7820c80819955defb03ce9c7f"/><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2a9cfca7820c803ab04bc88497cbed98" data-id="2a9cfca7820c803ab04bc88497cbed98"><span><div id="2a9cfca7820c803ab04bc88497cbed98" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c803ab04bc88497cbed98" title="1. SVM（支持向量机）分类的核心概念"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>1. SVM（支持向量机）分类的核心概念</b></span></span></h2><div class="notion-text notion-block-2a9cfca7820c803ebd79f74568ed68bc">支持向量机（SVM）是一种用于分类和回归分析的监督学习方法，特别适用于分类任务。它的基本思想是：在高维空间中，找到一个最佳的超平面（hyperplane），这个超平面能最大化不同类别数据点之间的间隔（margin）。间隔越大，分类器的泛化能力就越强，意味着它在面对未知数据时有更好的预测效果。</div><div class="notion-callout notion-gray_background_co notion-block-2a9cfca7820c8056b604d2544ced2a20"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="😀">😀</span></div><div class="notion-callout-text"><b>为什么使用SVM？</b><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80c18fafd85299470210"><li><b>最大间隔原理</b>：通过最大化类别之间的间隔来构造分类边界，减少模型的过拟合可能性。</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c802791e5e99d6d982b99"><li><b>核函数的使用</b>：SVM通过核函数将数据从原始空间映射到更高维度，使得原本不可分的数据变得可以分割。这一过程能有效地处理非线性分类问题。</li></ul></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2a9cfca7820c80348bfdd651e5977d40" data-id="2a9cfca7820c80348bfdd651e5977d40"><span><div id="2a9cfca7820c80348bfdd651e5977d40" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c80348bfdd651e5977d40" title="2. 数据准备：数据格式化与预处理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2. 数据准备：数据格式化与预处理</b></span></span></h2><div class="notion-text notion-block-2a9cfca7820c8081a864e2e88ee1e531">SVM要求数据是数值型向量，因此，首先需要确保数据格式适合SVM的输入要求。数据预处理是获得良好分类性能的基础，文章中详细描述了两种常见的预处理步骤：<b>类别特征处理</b>和<b>数据缩放</b>。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2a9cfca7820c800f8befd32fddb84633" data-id="2a9cfca7820c800f8befd32fddb84633"><span><div id="2a9cfca7820c800f8befd32fddb84633" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c800f8befd32fddb84633" title="2.1 类别特征的处理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2.1 类别特征的处理</b></span></span></h3><div class="notion-text notion-block-2a9cfca7820c804e9f54f9b6484ef5ae">在许多数据集里，原始数据中包含了类别特征（例如：颜色、性别等）。SVM要求数据是数值型的，因此需要将类别特征转换为数值型特征。最常见的做法是使用<b>独热编码</b>（One-Hot Encoding）。</div><div class="notion-text notion-block-2a9cfca7820c807fa47ff6b4797e952e">例如，对于一个包含三种颜色（红、绿、蓝）的特征，可以将其转化为如下数值向量：</div><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c809d93bae6c42f4375f6"><li>红色 -&gt; [1, 0, 0]</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80f6bb07dfbf51cf2dd5"><li>绿色 -&gt; [0, 1, 0]</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80f38dd7df8492d7284e"><li>蓝色 -&gt; [0, 0, 1]</li></ul><div class="notion-text notion-block-2a9cfca7820c800691caefba4d808899">这种方法的优势是可以避免类别之间的顺序关系被模型错误地理解。例如，SVM不会将“绿色”视为比“红色”大或小的值。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2a9cfca7820c809ca8abfa6af3fd8553" data-id="2a9cfca7820c809ca8abfa6af3fd8553"><span><div id="2a9cfca7820c809ca8abfa6af3fd8553" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c809ca8abfa6af3fd8553" title="2.2 数据缩放的重要性"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2.2 数据缩放的重要性</b></span></span></h3><div class="notion-text notion-block-2a9cfca7820c80659c37c9e0ced5bece">SVM的分类性能高度依赖于数据之间的距离计算。在SVM中，模型通过计算不同数据点之间的内积来衡量它们的相似性。如果某些特征的数值范围非常大，而其他特征的数值范围较小，数值较大的特征可能主导分类器的学习过程。为了避免这种情况，我们通常对数据进行<b>缩放</b>。</div><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c805e8882f3c64f911e62"><li><b>标准化（Standardization）</b>：将数据的均值调整为0，标准差调整为1，使得每个特征的分布具有相同的尺度。</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c8008b3c0f3340452a4d4"><li><b>缩放到区间</b>：将数据缩放到一个统一的范围（例如[-1, 1]或[0, 1]）。这一操作能确保每个特征在模型训练过程中有相似的影响力。</li></ul><div class="notion-text notion-block-2a9cfca7820c8056951fde99178316bb">例如，如果某个特征的值范围是[10, 1000]，而另一个特征的值范围是[0, 1]，那么缩放操作可以将所有特征调整到统一的范围。</div><div class="notion-callout notion-gray_background_co notion-block-2a9cfca7820c800d96ceed51b054e2fb"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="😀">😀</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2a9cfca7820c80138005fbf8cb3eb68e"><b>为什么要缩放？</b></div><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c8046997bd3ec7c9d1d26"><li>确保所有特征在相同的尺度上，从而避免某些特征因数值范围较大而在模型中占据主导地位。</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80b6a5ffeafadc894b31"><li>避免数值计算中的精度问题，尤其是在计算核函数时，较大的数值可能导致计算不稳定。</li></ul></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2a9cfca7820c80c4917de9f96773fa9f" data-id="2a9cfca7820c80c4917de9f96773fa9f"><span><div id="2a9cfca7820c80c4917de9f96773fa9f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c80c4917de9f96773fa9f" title="3. 核函数与参数选择"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>3. 核函数与参数选择</b></span></span></h2><div class="notion-text notion-block-2a9cfca7820c80588473d7f75ffa21a5">SVM使用核函数将数据映射到高维空间，核心目标是找到能够将不同类别数据分开的超平面。常见的核函数有四种：<b>线性核</b>、<b>多项式核</b>、<b>径向基函数（RBF）核</b>和<b>sigmoid核</b>。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2a9cfca7820c80e7a15ec0b1c509217b" data-id="2a9cfca7820c80e7a15ec0b1c509217b"><span><div id="2a9cfca7820c80e7a15ec0b1c509217b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c80e7a15ec0b1c509217b" title="3.1 核函数的选择：RBF核的使用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>3.1 核函数的选择：RBF核的使用</b></span></span></h3><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80e2af4fd214997bdc3a"><li><b>线性核</b>：适用于数据是线性可分的情况，即数据可以通过一个直线（二维）或超平面（高维）完全分开。</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80f0bbc9cff03687607a"><li><b>RBF核</b>：这是最常用的核函数，特别适合处理复杂的非线性问题。它能够将数据映射到一个高维空间，使得非线性问题变得线性可分。通过RBF核，SVM能够处理大多数实际问题。</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c805f8925f26b48e4b97a"><li><b>多项式核</b>：适用于数据之间的关系是多项式的情形。</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80a0a5ecea28191ff302"><li><b>sigmoid核</b>：这种核与神经网络中的激活函数类似，但通常较少使用。</li></ul><div class="notion-callout notion-gray_background_co notion-block-2a9cfca7820c80079f1edea00bb755d7"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="😀">😀</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2a9cfca7820c80cc8e0ec11615e6058f"><b>为什么推荐RBF核？</b></div><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c8073b604e5c7a2456aea"><li>RBF核具有良好的性能，尤其适合于数据复杂、非线性可分的情况。</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80e281c1fbc70d15f415"><li>通过调整RBF核中的参数γ，我们可以控制数据在高维空间的映射程度，进而影响分类效果。</li></ul></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2a9cfca7820c80ac8364fb19006fa372" data-id="2a9cfca7820c80ac8364fb19006fa372"><span><div id="2a9cfca7820c80ac8364fb19006fa372" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c80ac8364fb19006fa372" title="3.2 C和γ的调节"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>3.2 C和γ的调节</b></span></span></h3><div class="notion-text notion-block-2a9cfca7820c80f2afc8d117c6448c69">选择合适的C和γ是SVM成功的关键。推荐的做法是使用<b>交叉验证</b>来找到最佳的参数组合。交叉验证将训练数据分成多个子集，每次用其中一个子集作为验证集，剩下的子集用来训练模型，最终通过不同的验证结果来评估模型的稳定性和泛化能力。</div><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80fb830bdc83829391a3"><li><b>C（惩罚参数）</b>：C参数决定了模型对于训练数据分类错误的容忍度。较大的C值会使得模型更倾向于尽可能避免训练错误，从而可能导致过拟合；较小的C值则会使模型更简化，可能出现欠拟合。</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c800c88aaec478e3428ac"><li><b>γ（核函数的参数）</b>：γ决定了RBF核在高维空间中映射的“宽度”。较大的γ值会使得决策边界更复杂，容易导致过拟合；较小的γ值会使得决策边界较为简单，可能导致欠拟合。</li></ul><div class="notion-callout notion-gray_background_co notion-block-2a9cfca7820c80f288a4da37e7a393e0"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="😀">😀</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2a9cfca7820c8057bb67f633281a606b"><b>为什么调节C和γ如此重要？</b></div><div class="notion-text notion-block-2a9cfca7820c80fe91b7f71be4dd8d1e">这两个超参数控制了模型的复杂性，调节它们能有效避免过拟合和欠拟合，从而提高模型的预测性能。</div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2a9cfca7820c802fad13f558aec0d194" data-id="2a9cfca7820c802fad13f558aec0d194"><span><div id="2a9cfca7820c802fad13f558aec0d194" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c802fad13f558aec0d194" title="4. 交叉验证与网格搜索"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>4. 交叉验证与网格搜索</b></span></span></h2><div class="notion-text notion-block-2a9cfca7820c80f6a177f987cb1afb2d">在SVM中，如何选择最佳的C和γ值是非常重要的。两种常用的调参方法是：<b>交叉验证</b>和<b>网格搜索</b>。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2a9cfca7820c80f69f3deb16d30a8093" data-id="2a9cfca7820c80f69f3deb16d30a8093"><span><div id="2a9cfca7820c80f69f3deb16d30a8093" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c80f69f3deb16d30a8093" title="4.1 交叉验证"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>4.1 交叉验证</b></span></span></h3><div class="notion-text notion-block-2a9cfca7820c80e88441d7dfa666d45f">交叉验证是通过将训练集分成多个小子集，每次用其中一个子集作为验证集，剩余的作为训练集，训练多个模型并验证其表现。最终，交叉验证的结果可以帮助我们评估模型的泛化能力，避免过拟合。</div><div class="notion-text notion-block-2a9cfca7820c807a8074e6768a76acda">交叉验证的好处是：即使某个子集的数据存在噪音或特殊情况，其他子集的数据仍然能够帮助训练出一个好的模型。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2a9cfca7820c8069baa6d5ad3397aec1" data-id="2a9cfca7820c8069baa6d5ad3397aec1"><span><div id="2a9cfca7820c8069baa6d5ad3397aec1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c8069baa6d5ad3397aec1" title="4.2 网格搜索"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>4.2 网格搜索</b></span></span></h3><div class="notion-text notion-block-2a9cfca7820c8043b45cc6426d087663">网格搜索是通过穷举的方式，逐一尝试多个C和γ的值组合，来找到最适合的参数组合。这种方法非常直观，能帮助找到最佳的超参数。</div><div class="notion-callout notion-gray_background_co notion-block-2a9cfca7820c808ba80bc60ce016ff81"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="😀">😀</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2a9cfca7820c80c19da3f2188dcebe34"><b>为什么交叉验证和网格搜索有效？</b></div><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80df83d3fae5aefcede9"><li><b>交叉验证</b>：它能够评估模型的泛化能力，避免我们只在训练数据上表现好，但在新数据上表现差（即过拟合）。</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80d0954cfe754bff35ed"><li><b>网格搜索</b>：通过穷举不同的参数组合，确保我们选择了一个在验证数据上表现最优的模型。</li></ul></div></div><div class="notion-row notion-block-2a9cfca7820c8064b508f11e026b1c0a"><div class="notion-column notion-block-2a9cfca7820c8077b96ade6d71ac9440" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a9cfca7820c80db8abfd2b449f47baa"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:331.984375px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A3b67c9a0-66a7-4ff7-a1bd-71ddfadb3e43%3Aimage.png?table=block&amp;id=2a9cfca7-820c-80db-8abf-d2b449f47baa&amp;t=2a9cfca7-820c-80db-8abf-d2b449f47baa" alt="在C和γ上进行松散网格搜索。注意横纵轴跨度。" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption">在C和γ上进行松散网格搜索。注意横纵轴跨度。</figcaption></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-2a9cfca7820c800ead5aee886044ebe0" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a9cfca7820c80749dbaf929dffb8269"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:331.984375px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A4a84a0b1-ab5b-489f-afc3-3d684ef6622d%3Aimage.png?table=block&amp;id=2a9cfca7-820c-8074-9dba-f929dffb8269&amp;t=2a9cfca7-820c-8074-9dba-f929dffb8269" alt="在C和γ上进行精细网格搜索。注意横纵轴跨度。" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption">在C和γ上进行精细网格搜索。注意横纵轴跨度。</figcaption></div></figure></div><div class="notion-spacer"></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2a9cfca7820c80b4babde77f132e0e41" data-id="2a9cfca7820c80b4babde77f132e0e41"><span><div id="2a9cfca7820c80b4babde77f132e0e41" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c80b4babde77f132e0e41" title="5. 常见错误与注意事项"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>5. 常见错误与注意事项</b></span></span></h2><div class="notion-text notion-block-2a9cfca7820c80cdae82e573fd2b4ccb">在使用SVM时，初学者常犯的一些错误包括：</div><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c8016b549d24e020dd4a6"><li><b>错误的缩放方式</b>：确保训练集和测试集使用相同的缩放参数。不同的缩放方式会导致模型对测试集的预测不准确。</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80c1ba93e4170345cf1f"><li><b>选择不合适的核函数</b>：在特征数量非常大的情况下，使用RBF核可能并不合适，反而使用线性核可能会更高效。</li></ul><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80e383a8e2d03c2f9584"><li><b>过拟合与欠拟合</b>：过拟合通常是因为C值过大或γ值过小导致模型过于复杂，欠拟合则可能是C值过小或γ值过大的结果。适当的调参是避免这两种情况的关键。</li><ul class="notion-list notion-list-disc notion-block-2a9cfca7820c80e383a8e2d03c2f9584"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a9cfca7820c809294eaed19b6e2f3d7"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:624px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ac65a63ed-6af4-4e18-b764-b1dd5a22f3af%3Aimage.png?table=block&amp;id=2a9cfca7-820c-8092-94ea-ed19b6e2f3d7&amp;t=2a9cfca7-820c-8092-94ea-ed19b6e2f3d7" alt="图中展示了一个二元分类问题来说明这个问题。实心圆和三角形代表训练数据，空心圆和三角形代表测试数据。
图a和b中分类器的测试准确率并不理想，因为它对训练数据存在过拟合。如果把图a和b中的训练集和测试集看作是交叉验证中的训练集和验证集，那么准确率确实不高。另一方面，图c和d中的分类器没有对训练数据过拟合，因此在交叉验证和测试准确率方面都表现更佳。" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption">图中展示了一个二元分类问题来说明这个问题。实心圆和三角形代表训练数据，空心圆和三角形代表测试数据。
图a和b中分类器的测试准确率并不理想，因为它对训练数据存在过拟合。如果把图a和b中的训练集和测试集看作是交叉验证中的训练集和验证集，那么准确率确实不高。另一方面，图c和d中的分类器没有对训练数据过拟合，因此在交叉验证和测试准确率方面都表现更佳。</figcaption></div></figure></ul></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2a9cfca7820c808eb27cc76909e20177" data-id="2a9cfca7820c808eb27cc76909e20177"><span><div id="2a9cfca7820c808eb27cc76909e20177" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a9cfca7820c808eb27cc76909e20177" title="6. 初学者快速上手：从数据预处理到模型训练"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>6. </b>初学者快速上手<b>：从数据预处理到模型训练</b></span></span></h2><ol start="1" class="notion-list notion-list-numbered notion-block-2a9cfca7820c80909a4ecb092ff0d652" style="list-style-type:decimal"><li><b>数据转换</b>：首先将数据转换为适合SVM的格式。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2a9cfca7820c80679956e91869b73d03" style="list-style-type:decimal"><li><b>数据预处理</b>：对数据进行缩放，确保特征之间在相同的数值范围内。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2a9cfca7820c8063b8e3cdd73c561042" style="list-style-type:decimal"><li><b>核函数选择</b>：推荐默认使用RBF核，因为它适用于大多数非线性分类问题。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2a9cfca7820c80499ecfc7fc59caa2f6" style="list-style-type:decimal"><li><b>交叉验证与网格搜索</b>：使用交叉验证找到最佳的C和γ参数，然后用这些参数训练整个训练集。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-2a9cfca7820c80ad8c2ad43b6be769c0" style="list-style-type:decimal"><li><b>模型评估</b>：使用测试集评估最终模型的准确性。</li></ol><div class="notion-text notion-block-2a9cfca7820c80b7a6f9c351b549c931">这些步骤可以帮助你在实际应用中高效使用SVM，避免陷入常见的困境。</div><div class="notion-blank notion-block-2a9cfca7820c8084a2b3fde8eb09d239"> </div><div class="notion-blank notion-block-2a9cfca7820c808891fbe62ef8909f3d"> </div><div class="notion-blank notion-block-2a9cfca7820c80ab8e18e3dc3aa14c0d"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[如何正确分析神经振荡]]></title>
            <link>https://tangly1024.com/article/oscillation_analysis</link>
            <guid>https://tangly1024.com/article/oscillation_analysis</guid>
            <pubDate>Thu, 08 May 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1e5cfca7820c80238929d20b22f13099"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-1edcfca7820c800f9d8adb6bd35951cb"><div>原文链接：<a class="notion-link" href="https://doi.org/10.1111/ejn.15361" target="_blank" rel="noopener noreferrer">https://doi.org/10.1111/ejn.15361</a></div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1edcfca7820c807ca345c130c3fa4fbf" data-id="1edcfca7820c807ca345c130c3fa4fbf"><span><div id="1edcfca7820c807ca345c130c3fa4fbf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1edcfca7820c807ca345c130c3fa4fbf" title="振荡检查清单（Oscillation Checklist）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">振荡检查清单（Oscillation Checklist）</span></span></h3><div class="notion-to-do notion-block-1edcfca7820c80458599cceace1c9792"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">存在神经振荡</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-1edcfca7820c80e0a886d52b709b3b6c"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">所选择的频率范围与关注的振荡相匹配</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-1edcfca7820c80fda7addb2ada48dbd0"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">非周期性活动已被充分控制</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-1edcfca7820c80a4b01bdbe127c3c700"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">已考虑并控制时间变异性</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-1edcfca7820c8095bccaf4dffc9b01a2"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">已考虑并控制波形形状</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-1edcfca7820c807cb0ced8b771cf98b9"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">已应用源分离技术</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-1edcfca7820c8014b92ee1defa01b1a7"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">所有使用的度量方法都具备足够的信噪比</div></div><div class="notion-to-do-children"></div></div><hr class="notion-hr notion-block-1edcfca7820c80929e84d145a40dbf37"/><div class="notion-blank notion-block-1edcfca7820c807eacbad057285bddbd"> </div><div class="notion-text notion-block-1e5cfca7820c80e48246d123fae52843">神经振荡是大脑电活动中最显著的节律现象之一。在静息态脑电、任务诱发LFP和认知负荷相关的MEG中，我们都能观察到一系列具有清晰频率结构的振荡节律。这些振荡的研究为理解注意力、记忆、感知乃至精神疾病提供了强有力的理论工具。研究者主要通过功率谱（spectral power）、相位分析（phase analysis）和耦合度量（coupling metrics）等方法来揭示大脑信息处理中的振荡机制。</div><div class="notion-text notion-block-1e5cfca7820c8025ab06d0b399d3ecfa">然而，Donoghue等人（2021）在其技术性综述中提出警示：这些分析方法往往建立在对信号特性的一系列&quot;默认假设&quot;之上，而这些假设在真实的神经信号中并不总是成立。一旦我们忽视了这些隐含前提，就很容易&quot;过度解读&quot;甚至&quot;误读&quot;数据。</div><div class="notion-text notion-block-1e5cfca7820c8089a43adccd211a34dd">本文将基于该文提出的七大误区，系统梳理每一项潜在的分析陷阱，解释其产生原因，并探讨如何在实际研究中规避这些问题。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1e5cfca7820c809bb810c73db9b5003d" data-id="1e5cfca7820c809bb810c73db9b5003d"><span><div id="1e5cfca7820c809bb810c73db9b5003d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c809bb810c73db9b5003d" title="一、功率谱中的能量并不等同于振荡的存在"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、功率谱中的能量并不等同于振荡的存在</span></span></h3><div class="notion-text notion-block-1e5cfca7820c80fba201c335a221348a">在神经信号分析中，我们习惯将功率谱中特定频率段的能量峰值解释为&quot;振荡的存在&quot;。例如，当观察到8–12Hz频段有显著能量区时，我们会自然地称之为&quot;alpha振荡&quot;。然而，Donoghue等人提醒我们，这种推断过于武断。</div><div class="notion-text notion-block-1e5cfca7820c80c3b815c607a0111a2d">神经场电位（如EEG、LFP等）不仅包含我们关注的节律成分（即真正的振荡），还包含广泛的非周期性（aperiodic）成分——尤其是所谓的&quot;1/f噪声&quot;。这种背景活动在功率谱中普遍存在，呈现一种典型的斜率结构：频率越高，功率越低。</div><div class="notion-text notion-block-1e5cfca7820c8036a5cdd302c9ac260a">问题在于，即使信号完全不包含真实节律，其功率谱在低频段仍可能出现&quot;凸起&quot;的能量。更为棘手的是，<b>当使用窄带滤波器进行band-pass滤波时，它会强制从非周期性背景信号中&quot;滤出&quot;一段看似规则的波形，这种处理可能误导我们认为观察到了节律性活动。</b></div><div class="notion-text notion-block-1e5cfca7820c80a38f15d80537f64c98">Donoghue等人通过一个经典例子说明了这一点：对一个纯粹的1/f噪声信号使用narrowband filter进行滤波，在滤波后的波形中仍能观察到貌似真实的振荡节律。这种假象仅仅是滤波器&quot;强行赋予&quot;信号以节律结构（参见原文图1c）。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1e5cfca7820c80be94cbd8ac15b0a4ad"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af1404e6c-d6ab-4e8a-ba61-adf65af01fe5%3Aimage.png?table=block&amp;id=1e5cfca7-820c-80be-94cb-d8ac15b0a4ad&amp;t=1e5cfca7-820c-80be-94cb-d8ac15b0a4ad" alt="图 1 如果没有验证振荡活动，则应用的测量方法可能反映非周期性活动。
a）非振荡信号（例如狄拉克 delta 函数）在所有频率上都表现出功率。
b）类似地，非振荡 1/f 信号也在所有频率上具有功率，包括典型的窄带区域：Delta（黄色）、theta（绿色）、alpha（蓝色）和 beta（紫色）。该功率谱说明了一个事实，即仅仅因为某个频率有功率，并不意味着该频率存在主导振荡。
c）（b）中显示的窄带滤波信号轨迹看起来是有节奏的。请注意，这反映的是来自非周期性活动的带功率，而不是任何窄带振荡。
d）有节奏的信号（例如纯正弦波）在功率谱中表现为主要峰值。
e）包含非周期性活动和窄带 alpha 振荡的组合信号。在这种情况下，振荡在功率谱中以峰值的形式可见，高于非周期性1/f类信号的频谱贡献。
f）可以检测频谱峰值，以识别数据中的假定振荡，如已识别的峰值所示（绿色）。频谱峰值检测可用于选择需要进一步分析的频带，例如，选择需要滤波的alpha范围进行后续分析（底部）。" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption"><b>图 1 </b>如果没有验证振荡活动，则应用的测量方法可能反映非周期性活动。
a）非振荡信号（例如狄拉克 delta 函数）在所有频率上都表现出功率。
b）类似地，非振荡 1/f 信号也在所有频率上具有功率，包括典型的窄带区域：Delta（黄色）、theta（绿色）、alpha（蓝色）和 beta（紫色）。该功率谱说明了一个事实，即仅仅因为某个频率有功率，并不意味着该频率存在主导振荡。
c）（b）中显示的窄带滤波信号轨迹看起来是有节奏的。请注意，这反映的是来自非周期性活动的带功率，而不是任何窄带振荡。
d）有节奏的信号（例如纯正弦波）在功率谱中表现为主要峰值。
e）包含非周期性活动和窄带 alpha 振荡的组合信号。在这种情况下，振荡在功率谱中以峰值的形式可见，高于非周期性1/f类信号的频谱贡献。
f）可以检测频谱峰值，以识别数据中的假定振荡，如已识别的峰值所示（绿色）。频谱峰值检测可用于选择需要进一步分析的频带，例如，选择需要滤波的alpha范围进行后续分析（底部）。</figcaption></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1e5cfca7820c80ea83c3cfb94b15a688" data-id="1e5cfca7820c80ea83c3cfb94b15a688"><span><div id="1e5cfca7820c80ea83c3cfb94b15a688" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c80ea83c3cfb94b15a688" title="正确做法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">正确做法</span></span></h4><div class="notion-text notion-block-1e5cfca7820c80918621eaf812fcb44c">因此，在开展任何振荡分析之前，最关键的第一步是<b>确认信号中确实存在节律活动</b>。Donoghue建议从两个维度进行检验：</div><ol start="1" class="notion-list notion-list-numbered notion-block-1e5cfca7820c80caa1d9fa058645ed7f" style="list-style-type:decimal"><li><b>频率域</b>：观察功率谱中是否存在超出背景的清晰峰值（spectral peak），而非仅是斜坡式的背景。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-1e5cfca7820c80b4872fe1e2ac3c3980" style="list-style-type:decimal"><li><b>时间域</b>：直接观察原始波形，寻找是否存在可见的、近似周期的节律段落。</li></ol><div class="notion-text notion-block-1e5cfca7820c80d693f3d2ed68648a33">此外，FOOOF（Fitting Oscillations and One-Over-F）或eBOSC等工具可用于定量分离周期性与非周期性成分，帮助判断功率是否确实源于振荡而非背景漂移。</div><hr class="notion-hr notion-block-1e5cfca7820c8008b5d9c6af86fdb6c4"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1e5cfca7820c800b8e66ff3a68565a91" data-id="1e5cfca7820c800b8e66ff3a68565a91"><span><div id="1e5cfca7820c800b8e66ff3a68565a91" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c800b8e66ff3a68565a91" title="二、标准频段划分并不适用于所有人"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、标准频段划分并不适用于所有人</span></span></h3><div class="notion-text notion-block-1e5cfca7820c805eb304c0343afc63a6">在神经科学研究中，我们习惯将脑电或LFP信号划分为标准频段：delta（1–4 Hz）、theta（4–8 Hz）、alpha（8–12 Hz）、beta（13–30 Hz）、gamma（&gt;30 Hz）。这种划分源于早期神经生理研究的总结，确实为群体水平分析提供了便利。然而，当我们机械地将其应用到每位被试、每个脑区时，却忽视了一个关键事实：<b>神经振荡的真实频率往往具有个体差异，甚至区域差异</b>。</div><div class="notion-text notion-block-1e5cfca7820c805ebd97c935a7ea8789">Donoghue等人通过模拟数据清楚地展示了这个问题。他们比较了两个信号：一个具有8 Hz的振荡峰，另一个具有10.5 Hz的振荡峰。若按&quot;alpha=8–12 Hz&quot;的标准定义，这两个信号在平均功率上都属于alpha波段。但若以更细的子区间（如8–10 Hz对比10–12 Hz）分析，这两个振荡就会被分别归类，甚至被误解为&quot;频段差异&quot;，从而导致分析偏差（见原文图2a–c）。</div><div class="notion-text notion-block-1e5cfca7820c80e0b5caf6681b7476ab">更为棘手的是，当个体的真实振荡频率落在这些边界之外（如theta与alpha的交界处），该振荡可能被忽视、弱化或误判为其他频率的变化。这种现象在睡眠研究和发展性神经科学中尤为明显，因为振荡频率会随年龄增长和神经状态而动态变化。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1e5cfca7820c8030b1bfd43c13fb5900"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af755bb31-4b0f-499e-b2ac-edbae8d1ac4c%3Aimage.png?table=block&amp;id=1e5cfca7-820c-8030-b1bf-d43c13fb5900&amp;t=1e5cfca7-820c-8030-b1bf-d43c13fb5900" alt="图 2 典型频带范围可能无法捕捉窄带峰值。
a）模拟信号及其相应的功率谱，其中存在显著的 10 Hz α 振荡。蓝色阴影部分为典型 α 范围（8-12 Hz）。
b）另一个具有显著 α 振荡的信号，峰值频率为 8 Hz。
c）使用典型频带范围，发现 (a) 和 (b) 中信号的 α 功率存在显著差异。检查相邻频带时（右图），由于 α 峰值漂移到典型 θ 范围内，θ 功率也存在测量差异。这些结果表明信号之间存在振荡功率差异；然而，这实际上是由 α 峰值频率差异造成的。
d）来自 (b) 的时间序列，已使用典型范围（蓝色）和个性化范围（绿色）滤波到 α 频率范围内。个体化范围已调整至时间序列的峰值频率（见插图功率谱）。请注意，个体化滤波器捕获了更多窄带活动。
e） 使用个体化频段后，测量的 alpha 功率不再存在差异，这与 (c) 中由于峰值频率不匹配而导致的测量差异一致。" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption"><b>图 2</b> 典型频带范围可能无法捕捉窄带峰值。
a）模拟信号及其相应的功率谱，其中存在显著的 10 Hz α 振荡。蓝色阴影部分为典型 α 范围（8-12 Hz）。
b）另一个具有显著 α 振荡的信号，峰值频率为 8 Hz。
c）使用典型频带范围，发现 (a) 和 (b) 中信号的 α 功率存在显著差异。检查相邻频带时（右图），由于 α 峰值漂移到典型 θ 范围内，θ 功率也存在测量差异。这些结果表明信号之间存在振荡功率差异；然而，这实际上是由 α 峰值频率差异造成的。
d）来自 (b) 的时间序列，已使用典型范围（蓝色）和个性化范围（绿色）滤波到 α 频率范围内。个体化范围已调整至时间序列的峰值频率（见插图功率谱）。请注意，个体化滤波器捕获了更多窄带活动。
e） 使用个体化频段后，测量的 alpha 功率不再存在差异，这与 (c) 中由于峰值频率不匹配而导致的测量差异一致。</figcaption></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1e5cfca7820c801aa847d5fa3333eac5" data-id="1e5cfca7820c801aa847d5fa3333eac5"><span><div id="1e5cfca7820c801aa847d5fa3333eac5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c801aa847d5fa3333eac5" title="正确做法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">正确做法</span></span></h4><div class="notion-text notion-block-1e5cfca7820c80dca7c8c334088c0989">要克服这一问题，关键在于：**避免预设频率段，而应根据每位被试、每个脑区的功率谱，动态地定义个体化频段。**这并非过于复杂或理想化的建议，许多研究工具已经提供了相关功能：</div><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c80c28b9ffe12cbd5f48e"><li><b>FOOOF模型</b>可以精确拟合功率谱中的峰值频率；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c8088a3d7f7c555a22235"><li><b>MODAL方法</b>（Watrous et al., 2018）可基于群体数据计算最可靠的频段边界；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c80029593f92e338f54c9"><li>对于任务相关研究，可根据baseline与任务期间的峰值差异来动态调整频段划分。</li></ul><div class="notion-text notion-block-1e5cfca7820c80a8a0a8dae0bd1b1767">总之，个体化分析不是一种&quot;奢侈&quot;，而是确保科学严谨性的必要步骤。在处理不同被试或不同脑区的数据时，提前确认其主导节律的频率位置，是避免后续误判的关键。</div><hr class="notion-hr notion-block-1e5cfca7820c80ecbf3aea1526d6590b"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1e5cfca7820c800b8e05c68a079e6a17" data-id="1e5cfca7820c800b8e05c68a079e6a17"><span><div id="1e5cfca7820c800b8e05c68a079e6a17" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c800b8e05c68a079e6a17" title="三、不是所有功率变化都反映振荡的改变"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、不是所有功率变化都反映振荡的改变</span></span></h3><div class="notion-text notion-block-1e5cfca7820c8050a64dfb1c50c1dc56">神经科学中的频域分析主要关注特定频段的功率变化。比如，注意力任务中alpha功率下降常被解读为&quot;皮层去同步&quot;，认知任务中theta功率上升则被视为&quot;执行负荷增强&quot;。然而，Donoghue等人强调，<b>功率谱中的变化不仅来自周期性振荡的增强或削弱，还可能源于非周期性背景活动的变化。</b></div><div class="notion-text notion-block-1e5cfca7820c802b9556ce85b1adec31">这种背景活动的变化主要体现在1/f谱结构上。当谱的斜率（exponent）改变时，整个功率谱会发生&quot;倾斜&quot;：或陡或平。这种斜率变化会导致高频能量下降、低频能量上升，即使周期性振荡本身并未发生实质性改变。</div><div class="notion-text notion-block-1e5cfca7820c80efb845f33dca896edb">Donoghue通过示意图清晰地说明了这一点：两个功率谱中的周期性振荡（如alpha峰的位置和带宽）完全相同，仅背景谱斜率不同，就能在各频段产生&quot;功率变化&quot;。如果不区分周期性和非周期性成分，这些变化容易被误解为&quot;神经节律调节&quot;或&quot;频段间功能交互&quot;。</div><div class="notion-text notion-block-1e5cfca7820c80c59e08ea38777128dd">这个问题在&quot;功率比值&quot;指标中尤其明显。例如，ADHD研究中常用的theta/beta比值，按照Donoghue等人的观点，<b>其变化更多反映的是背景谱的整体倾斜，而非真正的频带振荡变化</b>。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1edcfca7820c809fbd3ced91f946f7cd"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A02a9834b-283b-465a-a5e8-be6d6d8af4fb%3Aimage.png?table=block&amp;id=1edcfca7-820c-809f-bd3c-ed91f946f7cd&amp;t=1edcfca7-820c-809f-bd3c-ed91f946f7cd" alt="图 3 非周期性活动的变化会影响频带功率测量。
a）非周期性白色（黑色）和粉红色（红色）噪声信号的示例，如其功率谱所示，它们在不同频率上显示出不同的功率模式。蓝色阴影表示典型的 α 范围，插图中显示的是 α 范围内的时间序列滤波。请注意，粉红噪声信号的“α”功率似乎有所增加。
b）包含非周期性和振荡功率（黑色）的模拟组合信号，以及在谱域中旋转后，具有相同周期分量但非周期分量发生变化的信号的变换版本（红色）。请注意，在（a）和（b）中，看似特定于频带的变化实际上反映了非周期性活动的差异。
c）使用相同振荡分量但不同非周期性活动模拟的组合信号的功率谱比较。阴影部分反映了不同的频带，包括 δ（黄色）、θ（绿色）、α（蓝色）、β（紫色）和 γ（红色）。
d）针对 (c) 图中光谱，分别计算每个频带的功率绝对差。请注意，尽管数据差异被模拟为非周期性成分的变化，但逐个频带的分析表明不同频带之间存在变化模式。
e）相对 α 功率（底部）的计算方法是将绝对频带功率（左上）除以所有频率的功率（右上）。请注意，尽管 α 功率的量没有差异，但由于信号之间存在系统性不同的非周期性活动，因此测量到的相对功率发生了变化。" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption"><b>图 3 </b>非周期性活动的变化会影响频带功率测量。
a）非周期性白色（黑色）和粉红色（红色）噪声信号的示例，如其功率谱所示，它们在不同频率上显示出不同的功率模式。蓝色阴影表示典型的 α 范围，插图中显示的是 α 范围内的时间序列滤波。请注意，粉红噪声信号的“α”功率似乎有所增加。
b）包含非周期性和振荡功率（黑色）的模拟组合信号，以及在谱域中旋转后，具有相同周期分量但非周期分量发生变化的信号的变换版本（红色）。请注意，在（a）和（b）中，看似特定于频带的变化实际上反映了非周期性活动的差异。
c）使用相同振荡分量但不同非周期性活动模拟的组合信号的功率谱比较。阴影部分反映了不同的频带，包括 δ（黄色）、θ（绿色）、α（蓝色）、β（紫色）和 γ（红色）。
d）针对 (c) 图中光谱，分别计算每个频带的功率绝对差。请注意，尽管数据差异被模拟为非周期性成分的变化，但逐个频带的分析表明不同频带之间存在变化模式。
e）相对 α 功率（底部）的计算方法是将绝对频带功率（左上）除以所有频率的功率（右上）。请注意，尽管 α 功率的量没有差异，但由于信号之间存在系统性不同的非周期性活动，因此测量到的相对功率发生了变化。</figcaption></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1e5cfca7820c8014bebde2e6045c7d96" data-id="1e5cfca7820c8014bebde2e6045c7d96"><span><div id="1e5cfca7820c8014bebde2e6045c7d96" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c8014bebde2e6045c7d96" title="正确做法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">正确做法</span></span></h4><div class="notion-text notion-block-1e5cfca7820c8067b5b9de74d19f7801">为避免这类误判，分析时应采取更精确的方法：</div><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c801a92e5d9c8fd06cfbd"><li>使用FOOOF或类似工具将功率谱分解为周期性与非周期性成分，分别分析其变化；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c808b8858c2a9f912baf5"><li>避免仅依赖&quot;频带功率平均&quot;或&quot;功率比值&quot;作为核心指标；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c80a5b1b5c3d74077d514"><li>结果报告时，明确说明所观察的功率变化是基于周期性峰值的变化，还是源于频谱结构的整体漂移。</li></ul><div class="notion-text notion-block-1e5cfca7820c8051a37cc8f47cdc50d0">通过准确区分&quot;频段功率增加&quot;与&quot;谱结构变化&quot;，我们才能更准确地理解神经振荡的功能意义，避免受背景因素干扰而得出错误结论。</div><hr class="notion-hr notion-block-1e5cfca7820c80f39c74e64cdc9b3492"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1e5cfca7820c80829dbcd2c1a7f70889" data-id="1e5cfca7820c80829dbcd2c1a7f70889"><span><div id="1e5cfca7820c80829dbcd2c1a7f70889" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c80829dbcd2c1a7f70889" title="四、振荡不是持续存在的，而是以&quot;爆发&quot;形式间歇出现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四、振荡不是持续存在的，而是以&quot;爆发&quot;形式间歇出现</span></span></h3><div class="notion-text notion-block-1e5cfca7820c808ea408ff87945f9de6">在许多分析中，我们常常假设神经振荡是持续存在的——比如认为alpha节律始终维持在8–12Hz，只是强度会有所变化。但在真实信号中，这种假设很少成立。Donoghue等人指出，大多数神经振荡在时间轴上呈现**断断续续、短暂爆发（burst-like）**的形式，而非稳定持续的&quot;纯振荡&quot;。</div><div class="notion-text notion-block-1e5cfca7820c80c89c86cbf580fa5c78">当我们将包含burst的多个试次取平均时，容易产生一个错觉：似乎信号中存在持续的振荡。例如，在注意任务中观察到的alpha功率上升，可能仅仅是因为某些trial中alpha burst出现得更频繁或持续更长，经过平均后形成了表观的&quot;持续激活&quot;（见原文Figure 4c）。</div><div class="notion-text notion-block-1e5cfca7820c80c782aad0836a9cc8ec">Donoghue等人通过模拟信号进一步证明，即使每个burst的幅度完全相同，仅仅是burst的出现频率、持续时间和分布时间的差异，就能导致平均功率的显著变化。这种变化容易被误解为&quot;振荡增强&quot;或&quot;同步化改变&quot;，但实际上只反映了爆发特征的统计差异（Figure 4b）。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1edcfca7820c80fc86cfef8d0b811289"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af98f100a-8481-42a1-b38b-a1a9387f2692%3Aimage.png?table=block&amp;id=1edcfca7-820c-80fc-86cf-ef8d0b811289&amp;t=1edcfca7-820c-80fc-86cf-ef8d0b811289" alt="图 4 神经振荡的时间动态影响频谱测量。
a）两个模拟信号，其 α 波段的爆发活动水平较低（顶部；蓝色）和较高（底部；绿色），以概率爆发开始和结束进行模拟。标识为爆发的片段以红色阴影表示。请注意，如果存在振荡功率，则两个信号中的振荡功率相同。
b）（a）中信号的功率谱。注意 alpha 峰值大小的差异，这表明信号之间的 alpha 功率存在差异。然而，当量化爆发内的功率时（插图条形图），发现功率大致相同。功率的明显差异是由于时间变异性的差异造成的。
c）时间变异性可能导致平均结果中出现虚假的持续功率。单次试验的声谱图（顶部）显示振荡功率的短暂爆发，平均下来产生看似持续的响应（底部）。 
d–f）测量到的功率差异可能由于爆发振荡的多种特征而产生，包括爆发持续时间（d）、发生频率（e）和/或振幅（f）的变化。在这些模拟中，两个时间序列中有一个特征有所不同，而其他所有特征均保持不变。每个特征都会在最终的 α 峰值中产生类似的差异，这表明测量到的功率可以反映所分析时间序列的多个时间变异性。" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption"><b>图 4 </b>神经振荡的时间动态影响频谱测量。
a）两个模拟信号，其 α 波段的爆发活动水平较低（顶部；蓝色）和较高（底部；绿色），以概率爆发开始和结束进行模拟。标识为爆发的片段以红色阴影表示。请注意，如果存在振荡功率，则两个信号中的振荡功率相同。
b）（a）中信号的功率谱。注意 alpha 峰值大小的差异，这表明信号之间的 alpha 功率存在差异。然而，当量化爆发内的功率时（插图条形图），发现功率大致相同。功率的明显差异是由于时间变异性的差异造成的。
c）时间变异性可能导致平均结果中出现虚假的持续功率。单次试验的声谱图（顶部）显示振荡功率的短暂爆发，平均下来产生看似持续的响应（底部）。 
d–f）测量到的功率差异可能由于爆发振荡的多种特征而产生，包括爆发持续时间（d）、发生频率（e）和/或振幅（f）的变化。在这些模拟中，两个时间序列中有一个特征有所不同，而其他所有特征均保持不变。每个特征都会在最终的 α 峰值中产生类似的差异，这表明测量到的功率可以反映所分析时间序列的多个时间变异性。</figcaption></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1e5cfca7820c80fd89d9c79376ea5bcc" data-id="1e5cfca7820c80fd89d9c79376ea5bcc"><span><div id="1e5cfca7820c80fd89d9c79376ea5bcc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c80fd89d9c79376ea5bcc" title="正确做法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">正确做法</span></span></h4><div class="notion-text notion-block-1e5cfca7820c806eb866fe2389d24e75">如果忽视振荡的burst特性，我们就无法真正理解信号背后的动力学机制。因此，分析时应采用<b>burst分析范式</b>：</div><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c8050ae60df685899c373"><li>不仅关注功率变化，还要统计burst的三个关键特征：出现频率、持续时间和振幅；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c804ca1e4ed3b70f7028e"><li>采用burst检测算法，如eBOSC、cycle-by-cycle或HMM方法，提取每次burst的动态特征；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c8006a7c0ebbdb6e64dfb"><li>保留单次trial的分析结果，避免仅依赖平均时频图来判断&quot;振荡是否存在&quot;。</li></ul><div class="notion-text notion-block-1e5cfca7820c80fa9dd6ca16393e8b13">特别是在研究任务反应、行为预测或治疗效果时，burst的微观结构（如&quot;刺激后250ms内是否出现burst&quot;）往往比平均功率能提供更有价值的信息。</div><hr class="notion-hr notion-block-1e5cfca7820c80f69b67e48b53654fce"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1e5cfca7820c80588be1e15c6ea55f53" data-id="1e5cfca7820c80588be1e15c6ea55f53"><span><div id="1e5cfca7820c80588be1e15c6ea55f53" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c80588be1e15c6ea55f53" title="五、振荡波形并非正弦形状，错误波形会产生&quot;耦合假象&quot;"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">五、振荡波形并非正弦形状，错误波形会产生&quot;耦合假象&quot;</span></span></h3><div class="notion-text notion-block-1e5cfca7820c8023b79bd70f51890e68">在所有时频分析方法中，有一个几乎不被质疑的基础假设：神经振荡呈现正弦波（sinusoid）形状。这看似理所当然——大多数滤波器设计、Hilbert变换提取相位/幅度、傅里叶分析建模，都建立在正弦假设之上。</div><div class="notion-text notion-block-1e5cfca7820c80c69ec8d1180055fd29">然而，大脑并非如此规整的发电机。Donoghue等人指出，许多常见神经振荡（如感觉运动mu节律、海马theta、视觉alpha）在时域中往往呈现<b>非正弦形态</b>：可能带有尖锐峰、不对称的上升/下降时间，甚至呈锯齿状。这种波形变形会带来两个严重后果：</div><ol start="1" class="notion-list notion-list-numbered notion-block-1e5cfca7820c80449adefb2fdcd780b2" style="list-style-type:decimal"><li><b>相位估计失真</b>：当对非正弦波进行带通滤波时，滤波器会丢失原波形的高次谐波成分，导致重构波形变形，进而影响每个采样点的相位值（Figure 5a）。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-1e5cfca7820c80ac8f82cb383f4283ea" style="list-style-type:decimal"><li><b>伪造频率耦合现象</b>：一个非正弦的alpha波（如10Hz）会在功率谱中自然产生二次、三次谐波（20Hz、30Hz），这可能被某些算法错误解读为beta/gamma与alpha之间存在PAC（相-幅耦合）（Figure 5b–e）。</li></ol><div class="notion-text notion-block-1e5cfca7820c80898a6ee36b4d7d2631">这意味着，<b>即便只测到单一频率的振荡，如果它不是正弦形状，传统算法也会显示&quot;存在跨频交互&quot;</b>，从而误导研究者推断大脑中存在功能性节律耦合机制。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1edcfca7820c804399b3ec83e1921384"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A6cd51ece-4714-4d3c-aa12-3bfbc8027bc3%3Aimage.png?table=block&amp;id=1edcfca7-820c-8043-99b3-ec83e1921384&amp;t=1edcfca7-820c-8043-99b3-ec83e1921384" alt="图 5 神经振荡的波形形状影响功率和耦合测量。
a）四种具有不同上升-衰减不对称性的时域信号（彩色轨迹）及其窄带滤波版本（黑色轨迹）。不对称振荡的窄带滤波会移动信号的峰值时间，阴影区域标记了原始信号和滤波版本峰值之间的距离。
b）在相应的功率谱中，由于不对称性，在谐波频率（恰好是振荡频率的两倍和三倍）处出现了频谱峰值。
c）这些谐波峰值的尺度与不对称性有关，因此增加波形不对称性可以表现为β频率范围内的功率增加。
d）非正弦节律也会产生杂散相位幅度耦合。10 Hz 非正弦 α 信号在 β 峰值频率（15-25 Hz）附近进行带通滤波。 β信号表现出幅度偏差，这取决于非正弦波形驱动的 α 相位（插图显示每个信号的功率谱）。
e）通过计算β包络作为α相位的函数来量化相位幅度耦合。与纯β正弦波（红色）相比，非正弦信号（蓝色）的β包络在特定α相位处呈现最小值，表明存在相位-幅度耦合，这种耦合由α节律的波形形状驱动。" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption"><b>图 5</b> 神经振荡的波形形状影响功率和耦合测量。
a）四种具有不同上升-衰减不对称性的时域信号（彩色轨迹）及其窄带滤波版本（黑色轨迹）。不对称振荡的窄带滤波会移动信号的峰值时间，阴影区域标记了原始信号和滤波版本峰值之间的距离。
b）在相应的功率谱中，由于不对称性，在谐波频率（恰好是振荡频率的两倍和三倍）处出现了频谱峰值。
c）这些谐波峰值的尺度与不对称性有关，因此增加波形不对称性可以表现为β频率范围内的功率增加。
d）非正弦节律也会产生杂散相位幅度耦合。10 Hz 非正弦 α 信号在 β 峰值频率（15-25 Hz）附近进行带通滤波。 β信号表现出幅度偏差，这取决于非正弦波形驱动的 α 相位（插图显示每个信号的功率谱）。
e）通过计算β包络作为α相位的函数来量化相位幅度耦合。与纯β正弦波（红色）相比，非正弦信号（蓝色）的β包络在特定α相位处呈现最小值，表明存在相位-幅度耦合，这种耦合由α节律的波形形状驱动。</figcaption></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1e5cfca7820c8047a43df1c39039e9cb" data-id="1e5cfca7820c8047a43df1c39039e9cb"><span><div id="1e5cfca7820c8047a43df1c39039e9cb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c8047a43df1c39039e9cb" title="正确做法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">正确做法</span></span></h4><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c801d8e7ced03dd29ffe2"><li>在时域中明确量化振荡的形态特征，如上升/衰减的非对称性、峰值锐度、波谷宽度等；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c80f78fb3fcd610f49023"><li>判断频谱中的多个峰值是否为谐波（整倍数关系），可使用双相干性、谐波PAC指标进行筛查；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c806f94aad8229ba143a7"><li>进行PAC分析时需特别注意：若高频信号总是出现在低频的特定相位上，不能直接推断为&quot;调制&quot;，还需验证是否源于波形结构本身。</li></ul><div class="notion-text notion-block-1e5cfca7820c806fb74af6f736d402b2">Donoghue等人建议：只有在准确量化并控制波形形状后，才能可靠地解释频率间的交互关系，否则容易得出&quot;虚假耦合&quot;的结论。</div><hr class="notion-hr notion-block-1e5cfca7820c802baa82e71f282c6667"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1e5cfca7820c8078873fca5377e2716c" data-id="1e5cfca7820c8078873fca5377e2716c"><span><div id="1e5cfca7820c8078873fca5377e2716c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c8078873fca5377e2716c" title="六、多源信号的混合常常掩盖真实振荡结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">六、多源信号的混合常常掩盖真实振荡结构</span></span></h3><div class="notion-text notion-block-1e5cfca7820c8039a693cde8e27006f3">在EEG/MEG等体表记录方式中，每个电极记录到的并非单一脑区的信号，而是多个脑区、多个振荡源通过体积传导（volume conduction）混合的结果。这种混合不仅影响功率测量，更会扭曲我们对节律来源与特征的理解。</div><div class="notion-text notion-block-1e5cfca7820c801e8237d3d2ab1077be">举例来说，当两个脑区各自产生alpha波（一个是10.5Hz，另一个是9Hz），它们混合后会在功率谱中表现出&quot;双峰&quot;（split alpha）现象。我们容易误认为这是&quot;一个脑区内部的两种alpha机制&quot;，实际上只是两个来源的重叠（Figure 6b）。更有趣的是，当两个源振荡频率相同但相位相反时，它们甚至可能在sensor level完全抵消（Figure 6c）。这会让研究者误以为&quot;振荡消失了&quot;，而实际上是&quot;被干扰了&quot;。</div><div class="notion-text notion-block-1e5cfca7820c8018bfedf41c36fc87c6">这个问题在连接性分析中尤为突出：当你观察到两个通道之间存在高相位同步时，很可能仅仅是因为同一个源同时投影到了两个通道，并非存在真实的神经连接。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1edcfca7820c80f0abe0f293058dfcfb"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A858fb83e-2aa1-4b9d-b95a-12fc03b68f72%3Aimage.png?table=block&amp;id=1edcfca7-820c-80f0-abe0-f293058dfcfb&amp;t=1edcfca7-820c-80f0-abe0-f293058dfcfb" alt="图 6 多个同时发生的节律会干扰并影响传感器级数据。
a）一个真实的头部模型，其中两个振荡源（红色和蓝色）放置在后皮质中，投射到突出显示的电极（绿色）上。下方是两个对记录电极有贡献的源的拓扑结构。两个源的导联场系数具有大致相等的值，表明对绿色电极上记录的活动的贡献相等。
b）在此模拟中，电极信号（绿色；底部）反映了多个底层源，包括两个不同的节律成分，其峰值频率略有不同。这些源可以看作是功率谱中的两个谱峰。
c）对两个具有相同峰值频率但具有相位差的振荡源进行单独模拟。由于相位差为π，两个源会相消叠加。在这种情况下，即使各个源的振荡功率稳定且一致，源的干扰也会在电极级相互抵消。请注意，在这些模拟中，振荡是非正弦的，这也会产生功率谱中看到的谐波峰值。" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption"><b>图 6 </b>多个同时发生的节律会干扰并影响传感器级数据。
a）一个真实的头部模型，其中两个振荡源（红色和蓝色）放置在后皮质中，投射到突出显示的电极（绿色）上。下方是两个对记录电极有贡献的源的拓扑结构。两个源的导联场系数具有大致相等的值，表明对绿色电极上记录的活动的贡献相等。
b）在此模拟中，电极信号（绿色；底部）反映了多个底层源，包括两个不同的节律成分，其峰值频率略有不同。这些源可以看作是功率谱中的两个谱峰。
c）对两个具有相同峰值频率但具有相位差的振荡源进行单独模拟。由于相位差为π，两个源会相消叠加。在这种情况下，即使各个源的振荡功率稳定且一致，源的干扰也会在电极级相互抵消。请注意，在这些模拟中，振荡是非正弦的，这也会产生功率谱中看到的谐波峰值。</figcaption></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1e5cfca7820c800cb60ee46ca4275e73" data-id="1e5cfca7820c800cb60ee46ca4275e73"><span><div id="1e5cfca7820c800cb60ee46ca4275e73" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c800cb60ee46ca4275e73" title="正确做法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">正确做法</span></span></h4><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c807f825bff71e51c1e6f"><li>避免仅在sensor level进行解读，应尽量使用源分离算法，如ICA、beamforming、GED等；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c8074a58cd5d44e3fe276"><li>在无法进行源定位时，选用能排除体积传导影响的连接性指标（如imaginary coherence、PLV的非零延迟版本）；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c80cab6fcf664c01482c2"><li>当观察到&quot;多个频率峰&quot;时，应优先考虑是否为多个来源混合所致，而非同源双节律。</li></ul><div class="notion-text notion-block-1e5cfca7820c80998931f177262586d3">Donoghue强调，虽然这些方法并非万能，但至少比直接依赖sensor level功率谱的解读更为可靠。</div><hr class="notion-hr notion-block-1e5cfca7820c801f817edc08219b2671"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1e5cfca7820c80e88ba9d70045a6fb10" data-id="1e5cfca7820c80e88ba9d70045a6fb10"><span><div id="1e5cfca7820c80e88ba9d70045a6fb10" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c80e88ba9d70045a6fb10" title="七、低信噪比下，一切分析都不可信"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">七、低信噪比下，一切分析都不可信</span></span></h3><div class="notion-text notion-block-1e5cfca7820c80968e3fef8f99d244cc">Donoghue等人最后指出，即便做足了前六点准备，如果信号本身的信噪比（SNR）过低，所有分析结果都可能是误判。</div><div class="notion-text notion-block-1e5cfca7820c805a9e85d80b746a343f">低SNR最常见的后果是：<b>相位估计不稳定（phase slips）</b>。这表现为相位的突然跳跃，同时功率变化也极不稳定。你原本想测量的&quot;振荡变化&quot;，实际测到的可能只是&quot;噪声抖动&quot;。这对phase-locking value、inter-trial coherence、PAC等分析特别致命——在SNR不足时，这些指标会偏离理论值，无法反映任何认知机制（Figure 7c–f）。</div><div class="notion-text notion-block-1e5cfca7820c80709a89e227721aea35">更隐蔽的危害在于：当比较两个条件间的这些指标时，差异可能仅源于SNR的不同，而非振荡本身的变化。这会让研究者错误地认为&quot;大脑发生了功能重组&quot;。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1edcfca7820c8007b4b5e95da9a5cc18"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A6bd722ab-c28a-45a1-b3a9-8ed5427fe80f%3Aimage.png?table=block&amp;id=1edcfca7-820c-8007-b4b5-e95da9a5cc18&amp;t=1edcfca7-820c-8007-b4b5-e95da9a5cc18" alt="图 7 低振荡信噪比 (SNR) 对测量的影响。
a）具有可变 SNR 的 α 振荡模拟信号的功率谱，如不同的峰高所示。 
b）具有高 SNR 的模拟信号之一，带有经 α 滤波的信号（顶部；蓝色），从中计算出瞬时相位（中间；红色）和频率（底部；绿色）。请注意，模拟信号具有一致的相位和频率。
c）与（b）相同，对于具有低 SNR 的信号。请注意，在这种情况下，由于低 SNR 导致的错误估计，相位和频率的估计是可变的。这导致瞬时相位出现箭头所示的相位滑移，这也会导致瞬时频率估计不稳定。 
d）高和低 SNR 信号的滤波版本。在模拟信号中，底层信号（灰色）除了功率差异外是相同的，并且具有均匀的相位。滤波后的轨迹（蓝色）与底层信号存在偏差，尤其是在低 SNR 信号中。
e）（d）中信号的相位估计，其中实心红色表示模拟振荡的真实相位，阴影表示在每个 SNR 范围内经过多次相位估计迭代后估计相位的标准偏差。这表明，SNR 越低，相位估计的方差就越大。这些不稳定的相位估计将影响后续测量，例如相位耦合。
f）在高功率振荡和功率降低的模拟信号之间计算出的锁相值，如（a）所示。请注意，所有模拟振荡都具有相同的模拟相位时间过程，因此预期的锁相值为 1，任何低于此值的估计都是由于低功率导致的错误估计。" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption"><b>图 7 </b>低振荡信噪比 (SNR) 对测量的影响。
a）具有可变 SNR 的 α 振荡模拟信号的功率谱，如不同的峰高所示。 
b）具有高 SNR 的模拟信号之一，带有经 α 滤波的信号（顶部；蓝色），从中计算出瞬时相位（中间；红色）和频率（底部；绿色）。请注意，模拟信号具有一致的相位和频率。
c）与（b）相同，对于具有低 SNR 的信号。请注意，在这种情况下，由于低 SNR 导致的错误估计，相位和频率的估计是可变的。这导致瞬时相位出现箭头所示的相位滑移，这也会导致瞬时频率估计不稳定。 
d）高和低 SNR 信号的滤波版本。在模拟信号中，底层信号（灰色）除了功率差异外是相同的，并且具有均匀的相位。滤波后的轨迹（蓝色）与底层信号存在偏差，尤其是在低 SNR 信号中。
e）（d）中信号的相位估计，其中实心红色表示模拟振荡的真实相位，阴影表示在每个 SNR 范围内经过多次相位估计迭代后估计相位的标准偏差。这表明，SNR 越低，相位估计的方差就越大。这些不稳定的相位估计将影响后续测量，例如相位耦合。
f）在高功率振荡和功率降低的模拟信号之间计算出的锁相值，如（a）所示。请注意，所有模拟振荡都具有相同的模拟相位时间过程，因此预期的锁相值为 1，任何低于此值的估计都是由于低功率导致的错误估计。</figcaption></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1e5cfca7820c807cbed1f0ade5723ae8" data-id="1e5cfca7820c807cbed1f0ade5723ae8"><span><div id="1e5cfca7820c807cbed1f0ade5723ae8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c807cbed1f0ade5723ae8" title="正确做法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">正确做法</span></span></h4><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c80899d2bdd12eb3042b9"><li>在分析前评估SNR：可通过目标频段峰值高度与周围背景均值的比值来估计；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c807a8494d581e6c1af4d"><li>确保不同条件、被试间的SNR保持一致，或在结果解释时控制SNR差异的影响；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c802c846de1600e7dbdaa"><li>采用在高SNR下更稳健的分析方法，如Kalman平滑器、Monte Carlo估计，或使用burst-level时间窗进行相位统计。</li></ul><div class="notion-text notion-block-1e5cfca7820c8033a349cb56b2855b91">Donoghue等人一针见血地指出：&quot;问题不在于方法不对，而在于根本没有可测量的信号。&quot;</div><hr class="notion-hr notion-block-1e5cfca7820c80cc8738ec4016baa154"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1e5cfca7820c807b926bd21309137e6b" data-id="1e5cfca7820c807b926bd21309137e6b"><span><div id="1e5cfca7820c807b926bd21309137e6b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c807b926bd21309137e6b" title="结语：从功率谱到神经机制，我们应该更谨慎地谈论振荡"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">结语：从功率谱到神经机制，我们应该更谨慎地谈论振荡</span></span></h3><div class="notion-text notion-block-1e5cfca7820c801297f6c4d1deddf507">神经振荡曾被誉为大脑节奏的语言，是大脑信息处理过程的组织者。Donoghue等人在这篇重要的综述中提醒我们，<b>要想科学地谈论&quot;振荡&quot;，我们首先必须弄清楚：我们分析的信号到底是不是振荡。</b></div><div class="notion-text notion-block-1e5cfca7820c80709ce5dd54563980f2">这七条分析陷阱表面上看是技术性问题——&quot;有没有振荡&quot;、&quot;频段准不准&quot;、&quot;背景有没有变&quot;。但其深层含义远不止如此。它们从不同角度指向一个核心事实：**神经信号极其复杂，我们用来处理它的工具却往往过于简化。**不恰当的假设、不充分的验证、过早的归因，都可能让我们在信号表面看到的&quot;规律&quot;变成误导。</div><div class="notion-text notion-block-1e5cfca7820c808a97f5cf3a5827a069">这七点之间并非孤立存在，而是层层相扣，互为因果：</div><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c808bb6aeeeed98faa38c"><li><b>没有节律的信号</b>（陷阱一）会被<b>固定频段划分</b>（陷阱二）误判为有；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c809f9f0ad867da7018ce"><li><b>背景1/f变化</b>（陷阱三）会掩盖或伪造功率变化，并干扰<b>burst检测</b>（陷阱四）；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c802fab74c7f6ad86d2db"><li><b>非正弦波形</b>（陷阱五）产生<b>假频率耦合</b>，而<b>多源干扰</b>（陷阱六）会让你误以为&quot;发现了一个神经网络&quot;；</li></ul><ul class="notion-list notion-list-disc notion-block-1e5cfca7820c807e8c87c0d6314ffee5"><li><b>低信噪比</b>（陷阱七）则会使所有上述分析结果都趋向随机。</li></ul><div class="notion-text notion-block-1e5cfca7820c80afb957f17694f57564">这些陷阱有一个共同特点：它们都不是源于&quot;算法不对&quot;，而是&quot;方法和数据之间的假设不匹配&quot;。正如作者所强调：<b>问题不在于分析公式的数学正确性，而在于我们对分析结果的生理意义解读是否成立。</b></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1e5cfca7820c803dbc87ed9b51a54699" data-id="1e5cfca7820c803dbc87ed9b51a54699"><span><div id="1e5cfca7820c803dbc87ed9b51a54699" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c803dbc87ed9b51a54699" title="如何面对这种复杂性？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">如何面对这种复杂性？</span></span></h4><div class="notion-text notion-block-1e5cfca7820c80dc942de91df1ba93ff">Donoghue等人并非否定神经振荡的研究意义，他们提出的是建设性反思，而非质疑。以下是对研究者们的几点建议：</div><ol start="1" class="notion-list notion-list-numbered notion-block-1e5cfca7820c80d0bdc8d3ee8da55a8f" style="list-style-type:decimal"><li><b>在分析前设定检查点，而不是在结果后寻找解释。</b>在进行任何频率分析、滤波、相位计算之前，请先确认信号中确实存在你要找的内容。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-1e5cfca7820c807dbeaae89744cf165c" style="list-style-type:decimal"><li><b>不怕复杂，怕的是简化不当。</b>每个功率变化都可能同时来自峰值、burst率、1/f斜率、SNR变化等多种因素。不要用简单的&quot;XX频段增强了&quot;来解释复杂的大脑过程。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-1e5cfca7820c80f6a756ca050b8e4e98" style="list-style-type:decimal"><li><b>让可视化和数据探索回到神经科学分析流程中。</b>绘制功率谱、trial-level波形、burst分布、非正弦波形，让你更贴近数据本身，而不是算法的想象。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-1e5cfca7820c800c8075c4ca404609dd" style="list-style-type:decimal"><li><b>引入新的工具，不等于抛弃已有知识。</b>如 FOOOF、eBOSC、cycle-by-cycle、source separation、harmonic control 等方法，都是为了更合理地运用已有分析思路，而非推倒重来。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1e5cfca7820c806c9774d03049ff3791" data-id="1e5cfca7820c806c9774d03049ff3791"><span><div id="1e5cfca7820c806c9774d03049ff3791" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c806c9774d03049ff3791" title="最后"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">最后</span></span></h4><div class="notion-callout notion-gray_background_co notion-block-1edcfca7820c80b68f3ae58ecb88aeec"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-1e5cfca7820c80eb9320fb98d74e02b5">不是所有功率谱的峰都是振荡，不是所有耦合现象都有生理意义，不是所有频率变化都意味着功能变化。</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1e5cfca7820c80779ed9f9d39d8ba029" data-id="1e5cfca7820c80779ed9f9d39d8ba029"><span><div id="1e5cfca7820c80779ed9f9d39d8ba029" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1e5cfca7820c80779ed9f9d39d8ba029" title="总结表"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">总结表</span></span></h3><table class="notion-simple-table notion-block-1e5cfca7820c80e683b4cf106c0c67b6"><tbody><tr class="notion-simple-table-row notion-block-1e5cfca7820c80c89716c1dc5b568d3d"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>主题</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>数据特性</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>方法学问题</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>建议</b></div></td></tr><tr class="notion-simple-table-row notion-block-1e5cfca7820c80229975d8c995ef2dc6"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>#1 振荡是否存在</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">神经振荡的存在具有变异性，可能在记录中并不总是出现</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">如果没有振荡存在，所用分析方法将无法反映真实的振荡活动，结果可能只是反映了非周期性成分</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">在开始分析前确认振荡是否存在，例如使用频谱峰值检测，或在时间域中使用 burst 检测方法</div></td></tr><tr class="notion-simple-table-row notion-block-1e5cfca7820c80888501fd341268d3fd"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>#2 频率变化</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">神经振荡的峰值频率在个体或区域间具有变异性</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">使用经典固定频段（如8–12 Hz）可能无法准确捕捉真实的振荡活动</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">在分析前验证频段设置的合理性，并根据实际数据进行个体化调整</div></td></tr><tr class="notion-simple-table-row notion-block-1e5cfca7820c80dcb57ad0cfa6f2f1a1"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>#3 非周期性活动</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">神经振荡与动态变化的非周期性活动共存</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">所观测到的功率变化可能源自非周期性成分的变化，而非周期性振荡本身的变化</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">分析中应衡量并控制非周期性成分的影响，明确其是否解释了观察到的变化</div></td></tr><tr class="notion-simple-table-row notion-block-1e5cfca7820c805fbe54f45adf26b2c8"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>#4 时间上的可变性</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">神经振荡在时间轴上具有可变性，常呈现 burst（突发）特征</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">若只分析平均功率，可能会将多个 trial 中的 burst 混合，形成虚假的“持续性活动”印象</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">检查单试次数据以评估时序变化，使用 burst 检测方法来准确量化 burst 特性</div></td></tr><tr class="notion-simple-table-row notion-block-1e5cfca7820c800c96afe795b6c24ee6"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>#5 波形形态</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">神经振荡常呈现非正弦形状的波形</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">分析方法常假设振荡为正弦形，若波形不规则，可能导致错误结果</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">应分析波形的形态特征（如对称性、尖锐度等），评估其是否影响了分析结果</div></td></tr><tr class="notion-simple-table-row notion-block-1e5cfca7820c8028ac5cd829d29b68c5"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>#6 多源振荡重叠</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">大脑中存在多个共存的振荡源，这些源在空间上可能重叠</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">多源干扰可能导致破坏性叠加，使结果无法准确反映真实活动</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">使用源分离技术（如ICA、beamforming）以减少不同振荡类型之间的混叠</div></td></tr><tr class="notion-simple-table-row notion-block-1e5cfca7820c80c1a97ec5ea4bdbab92"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>#7 信噪比变异</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">神经振荡的信噪比存在变化</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">若信噪比不足，则任何分析结果都可能不可靠甚至失真</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">评估分析所需的最低信噪比，并优化获取路径，以保障所有测量方法的可靠性</div></td></tr></tbody></table><div class="notion-blank notion-block-1edcfca7820c809aa648e578937e6a4d"> </div><div class="notion-blank notion-block-1edcfca7820c8021963dd9b723dd8c28"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[期末考试最实用的20个聊天提示]]></title>
            <link>https://tangly1024.com/article/exam_chats</link>
            <guid>https://tangly1024.com/article/exam_chats</guid>
            <pubDate>Thu, 08 May 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1edcfca7820c80c7bf7ddf01da028b9f"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-1edcfca7820c80d4a34ad2846f39ebe6"><div>原文链接：<b><a class="notion-link" href="https://edunewsletter.openai.com/p/top-20-chats-for-finals" target="_blank" rel="noopener noreferrer">Top 20 chats for finals</a></b></div></blockquote><div class="notion-callout notion-gray_background_co notion-block-1edcfca7820c803bb13dc4f0adbc111e"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-1edcfca7820c80ce9b63ecf7fc246a6f">来自世界各地大学的学生分享了他们正在使用的具体聊天功能。您可以将这些内容复制粘贴到 ChatGPT 中，亲自尝试一下。</div></div></div><ol start="1" class="notion-list notion-list-numbered notion-block-1edcfca7820c80c3a22fca519c115ebf" style="list-style-type:decimal"><li><b>我想通过教学来学习。</b>问我一些关于 [xx话题] 的问题，这样我可以练习向你解释核心概念。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80c3a22fca519c115ebf" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c80ea8efcf4416014d6b2">[<b>I want to learn by teaching. </b>Ask me questions about [topic] so I can practice explaining the core concepts to you.]</div></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-1edcfca7820c801c97b0ff9ac0863710" style="list-style-type:decimal"><li>用三个不同的理解层次<b>向我解释 [xx话题]</b>，从小学水平到大学水平。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c801c97b0ff9ac0863710" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c805c97c7eb0149d118d8">[<b>Explain [topic] to me</b> in 3 different levels of understanding from elementary school level to college level.]</div></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-1edcfca7820c802b8489f8c77b1efa8e" style="list-style-type:decimal"><li>我想在继续写作前测试我的论文压力点。<b>提出现有的反对观点</b>和我逻辑中的任何漏洞。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c802b8489f8c77b1efa8e" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c80d1a061da53a6c3cba8">[I want to pressure test my thesis before I keep writing. <b>Suggest the existing opposing viewpoints</b> and any flaws in my logic.]</div></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-1edcfca7820c80b4ab3afc865147f97c" style="list-style-type:decimal"><li>我想为 [xx课程] 的最终展示进行练习。<b>扮演我的公众演讲教练</b>并给我反馈，帮助我提升。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80b4ab3afc865147f97c" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c80ac916dfcd0ba41bcb7">[I want to practice my final presentation for [course]. <b>Act as my public speaking coach</b> and give me feedback to help me improve.]</div></ol></ol><ol start="5" class="notion-list notion-list-numbered notion-block-1edcfca7820c80718efaece5eee14924" style="list-style-type:decimal"><li>我想了解 [xx话题]。识别并分享这个主题中<b>最重要的20%内容</b>，这将帮助我理解80%的内容。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80718efaece5eee14924" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c802d9440fff2217a69c3">[I want to learn about [topic]. Identify and share the <b>most important 20% of learnings</b> from this topic that will help me understand 80% of it.]</div></ol></ol><ol start="6" class="notion-list notion-list-numbered notion-block-1edcfca7820c80a99343c6f5fa0b9f80" style="list-style-type:decimal"><li>你能否把以下幻灯片内容变得<b>更快速、更有趣</b>地让我学习？</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80a99343c6f5fa0b9f80" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c8012b109edb27f29c1bb">[Can you take the following slides and help me learn the content in <b>a faster and more interesting way</b>?]</div></ol></ol><ol start="7" class="notion-list notion-list-numbered notion-block-1edcfca7820c804487c8c611a18e8139" style="list-style-type:decimal"><li>创建<b>一张图像来帮助我直观理解</b> [xx概念]。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c804487c8c611a18e8139" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c806da11bc03a97c524bb">[Create <b>an image to help me visualize</b> [concept].]</div></ol></ol><ol start="8" class="notion-list notion-list-numbered notion-block-1edcfca7820c8091b46ae7de9a9da4a6" style="list-style-type:decimal"><li>我在理解 [xx话题] 上有困难，为我<b>设计一个游戏</b>，帮助我实现 [xx学习目标]。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c8091b46ae7de9a9da4a6" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c8065adb3fb9b57b7d1a3">[I am struggling to understand [topic] and want you to <b>create a game</b> to help me [learning goals].]</div></ol></ol><ol start="9" class="notion-list notion-list-numbered notion-block-1edcfca7820c80838d83fe48946a82aa" style="list-style-type:decimal"><li>把这段<b>晦涩的文字解码</b>为我能理解的语言。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80838d83fe48946a82aa" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c8081bb3aee68bde5f350">[<b>Decode this dense passage</b> into language I can understand.]</div></ol></ol><ol start="10" class="notion-list notion-list-numbered notion-block-1edcfca7820c801abe42dd6246f3961d" style="list-style-type:decimal"><li><b>提供一份关于 [xx话题] 的顶级同行评审期刊文章清单</b>。包括标题、作者、日期和论文链接，并总结主要发现及其与主题的关联。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c801abe42dd6246f3961d" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c8030a37ad9c7f79447c9">[<b>Provide a comprehensive list of articles</b> from top tier peer reviewed journals on [topic]. Include the title, authors, date and link to the full paper and summarize the main findings and their relevance to the topic.]</div></ol></ol><ol start="11" class="notion-list notion-list-numbered notion-block-1edcfca7820c80fc81eaffc60396baad" style="list-style-type:decimal"><li>扮演我的教授，根据评分标准<b>为我的作业评分</b>。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80fc81eaffc60396baad" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c800ca5fad6ff46f98f18">[Act as my professor and <b>grade my assignment</b> according to the rubric.]</div></ol></ol><ol start="12" class="notion-list notion-list-numbered notion-block-1edcfca7820c80db840ff94341c6985e" style="list-style-type:decimal"><li>用APA格式<b>引用这个网站</b>：[xx链接来源]。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80db840ff94341c6985e" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c80dd9baad0e08504f618">[Please <b>cite this website</b> for me in APA format: [source].]</div></ol></ol><ol start="13" class="notion-list notion-list-numbered notion-block-1edcfca7820c807cbc32c70c0001f219" style="list-style-type:decimal"><li><b>为我提供一个逐步指南</b>，帮助我完成 [xx项目]。每一步都尽量细小且可实现。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c807cbc32c70c0001f219" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c800daceffc963ca9368f">[<b>Give me a step-by-step guide</b> to help me finish [project]. Make the steps as small and achievable as possible.]</div></ol></ol><ol start="14" class="notion-list notion-list-numbered notion-block-1edcfca7820c80889763f1c87dee836f" style="list-style-type:decimal"><li>查看这个作业中的所有规则和要求，并<b>制作一个易于理解的检查清单</b>。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80889763f1c87dee836f" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c8043947ad1712c10115d">[Look for any rules and requirements in this assignment and<b> make a checklist</b> that&#x27;s easy to understand.]</div></ol></ol><ol start="15" class="notion-list notion-list-numbered notion-block-1edcfca7820c80788a00f69f6a2b41c0" style="list-style-type:decimal"><li>我今天没有状态。<b>根据我的心情帮助我理解这节课的内容。</b></li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80788a00f69f6a2b41c0" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c80a88ffdc1f2f11245ef">[I’m not feeling it today. <b>Help me understand this lecture knowing that&#x27;s how I feel.</b>]</div></ol></ol><ol start="16" class="notion-list notion-list-numbered notion-block-1edcfca7820c80e0a093e9314c0977b9" style="list-style-type:decimal"><li>把这些内容变成<b>抽认卡风格的问题和答案</b>。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80e0a093e9314c0977b9" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c80c89edfc168764678b1">[Turn this into<b> flashcard style questions and answers</b>.]</div></ol></ol><ol start="17" class="notion-list notion-list-numbered notion-block-1edcfca7820c80378b00e935146980d1" style="list-style-type:decimal"><li>我即将参加 [xx课程] 的考试。基于该课程内容<b>为我创建一份练习测验</b>。逐题提问。考试形式为 [xx考试形式]，遵循这种风格。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80378b00e935146980d1" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c8059924dd5067cffd829">[I have an upcoming exam for [course]. <b>Create a practice quiz for me</b> based on the material. Ask me each question one by one. The exam will be [exam format] so please follow this style.]</div></ol></ol><ol start="18" class="notion-list notion-list-numbered notion-block-1edcfca7820c80768a9fcb5400056a01" style="list-style-type:decimal"><li><b>用语法错误的西班牙语写句子，我来尝试改正</b>。用英文提供纠正。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80768a9fcb5400056a01" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c80e19cc6cfb4b1f26391">[Write sentences in Spanish with <b>incorrect grammar and I will try to fix them</b>. Please provide corrections in English.]</div></ol></ol><ol start="19" class="notion-list notion-list-numbered notion-block-1edcfca7820c8085a019e6d0494600b9" style="list-style-type:decimal"><li>我正在学习 [xx话题]。<b>鼓励我</b>。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c8085a019e6d0494600b9" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c80f3a9f0c15f700853c0">[I&#x27;m studying [topic]. <b>Motivate me</b>.]</div></ol></ol><ol start="20" class="notion-list notion-list-numbered notion-block-1edcfca7820c80d2bd83ea4890b132b4" style="list-style-type:decimal"><li>我正在写关于 [xx话题] 的文章，想<b>从多个角度进行思考</b>。找出三位对此持不同观点的专家并比较他们的意见。</li><ol class="notion-list notion-list-numbered notion-block-1edcfca7820c80d2bd83ea4890b132b4" style="list-style-type:lower-alpha"><div class="notion-text notion-block-1edcfca7820c8045a73ef64f75afae49">[I am writing about [topic] and want to <b>consider multiple perspectives</b>. Find 3 experts with different points of view and compare their opinions.]</div></ol></ol><div class="notion-blank notion-block-1edcfca7820c8011a98aee2b20658fc6"> </div><div class="notion-text notion-block-1edcfca7820c808fab9dddf0b73a7a39"><b>感谢所有分享和测试这些对话的同学 ✨</b></div><div class="notion-blank notion-block-1edcfca7820c80659322eb8bda187fa0"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[网络爬虫和HTML基础]]></title>
            <link>https://tangly1024.com/article/python_webscrap</link>
            <guid>https://tangly1024.com/article/python_webscrap</guid>
            <pubDate>Fri, 18 Apr 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1d9cfca7820c8083b790dde77f8d7225"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1d9cfca7820c8038844dd49e803827b8"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:288px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A198e85e2-2aa1-4629-86b5-5e3440c1dd82%3A188ff913-71c5-4241-9386-aafc9c2ae64d.png?table=block&amp;id=1d9cfca7-820c-8038-844d-d49e803827b8&amp;t=1d9cfca7-820c-8038-844d-d49e803827b8" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d9cfca7820c804cbd3fe1efa04d9ffc" data-id="1d9cfca7820c804cbd3fe1efa04d9ffc"><span><div id="1d9cfca7820c804cbd3fe1efa04d9ffc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c804cbd3fe1efa04d9ffc" title="目标"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>目标</b></span></span></h2><div class="notion-text notion-block-1d9cfca7820c80b4b104ce6b9dad5a86">完成本次阅读后，您将能够：</div><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c80599c94d2c3c994f58a"><li>理解HTML结构和标签组成的关键概念</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c80368feee9cf53ca4fd9"><li>掌握HTML文档树的概念</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c8093addef342fc78782f"><li>熟悉HTML表格的使用</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c801c8829ed21e68b5ce9"><li>掌握使用Python和BeautifulSoup进行网页抓取的基础知识</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d9cfca7820c80ed99d4f1fee6930b84" data-id="1d9cfca7820c80ed99d4f1fee6930b84"><span><div id="1d9cfca7820c80ed99d4f1fee6930b84" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c80ed99d4f1fee6930b84" title="网络爬虫简介"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>网络爬虫简介</b></span></span></h2><div class="notion-text notion-block-1d9cfca7820c802eb0d3d9f6b7c6919e">网络爬虫（web scraping，也称为网络采集或网络数据提取）是从网站中自动提取信息的过程。它被广泛应用于数据分析、数据挖掘、价格比较和内容聚合等领域。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d9cfca7820c8074a535c303b63558bc" data-id="1d9cfca7820c8074a535c303b63558bc"><span><div id="1d9cfca7820c8074a535c303b63558bc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c8074a535c303b63558bc" title="网络爬虫如何工作"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>网络爬虫如何工作</b></span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c803996f9d2980bb8c82f" data-id="1d9cfca7820c803996f9d2980bb8c82f"><span><div id="1d9cfca7820c803996f9d2980bb8c82f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c803996f9d2980bb8c82f" title="HTTP请求"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>HTTP请求</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c803db894f2b14aee6b6e"><span class="notion-yellow_background">网络爬虫的工作始于发送HTTP请求。</span>它向特定URL发送请求（通常是HTTP GET请求）来获取网页内容，这个过程类似于浏览器访问网站。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c805da6f6c75eb0f80d97" data-id="1d9cfca7820c805da6f6c75eb0f80d97"><span><div id="1d9cfca7820c805da6f6c75eb0f80d97" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c805da6f6c75eb0f80d97" title="网页检索"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>网页检索</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c8097959ee9d8ec3383e3">网站服务器接收到请求后，会返回网页的HTML内容，包括可见的文本、媒体元素以及定义页面布局的HTML结构。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c805092b6fd2fc6853ca1" data-id="1d9cfca7820c805092b6fd2fc6853ca1"><span><div id="1d9cfca7820c805092b6fd2fc6853ca1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c805092b6fd2fc6853ca1" title="HTML解析"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>HTML解析</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c80d2abebf5cdd518e41b">获取HTML内容后，需要将其解析成可处理的格式。在Python中，我们使用BeautifulSoup库来完成这项工作。它能将HTML内容转换为结构化的格式，便于导航和操作。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c802f9893e6446bb0fad7" data-id="1d9cfca7820c802f9893e6446bb0fad7"><span><div id="1d9cfca7820c802f9893e6446bb0fad7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c802f9893e6446bb0fad7" title="数据提取"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>数据提取</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c80f99b7cdb0c5647a77c">完成HTML解析后，爬虫可以开始提取所需的特定数据，如文本、链接、图像、表格、产品价格或新闻文章等。爬虫通过识别HTML标签、属性和结构模式来定位这些数据。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c8096a458d5d8e1002881" data-id="1d9cfca7820c8096a458d5d8e1002881"><span><div id="1d9cfca7820c8096a458d5d8e1002881" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c8096a458d5d8e1002881" title="数据转换"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>数据转换</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c80fa85dcf43e18c6ac90">提取的数据通常需要进一步处理，如移除HTML标签、转换数据格式或清理杂乱数据。这个步骤确保数据可用于后续分析或其他用途。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c80929e3de32891dd9bef" data-id="1d9cfca7820c80929e3de32891dd9bef"><span><div id="1d9cfca7820c80929e3de32891dd9bef" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c80929e3de32891dd9bef" title="存储"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>存储</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c801d9131d658bf723c3c">处理后的数据可以存储在数据库、电子表格、JSON或CSV文件等多种格式中。存储格式的选择取决于具体项目需求。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c80ba9bbbe0ea079de2ca" data-id="1d9cfca7820c80ba9bbbe0ea079de2ca"><span><div id="1d9cfca7820c80ba9bbbe0ea079de2ca" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c80ba9bbbe0ea079de2ca" title="自动化"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>自动化</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c8072b579d513a2c9d08e">网页抓取通常通过脚本或程序实现自动化。这些工具可以定期从多个网页或网站提取数据，特别适合采集动态更新的网站内容。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1d9cfca7820c8023a866d2e3efccffc3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A7345cfe2-81bf-4bc8-9fdf-e88070d803e4%3Ac1e55750-753a-412a-ab5a-5348ba7c8ef1.png?table=block&amp;id=1d9cfca7-820c-8023-a866-d2e3efccffc3&amp;t=1d9cfca7-820c-8023-a866-d2e3efccffc3" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d9cfca7820c80e38db9f5d49b863bce" data-id="1d9cfca7820c80e38db9f5d49b863bce"><span><div id="1d9cfca7820c80e38db9f5d49b863bce" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c80e38db9f5d49b863bce" title="HTML结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>HTML结构</b></span></span></h2><div class="notion-text notion-block-1d9cfca7820c806bac7ae19c45c9d07d"><span class="notion-yellow_background">超文本标记语言（HTML）是网页的基础，</span><span class="notion-yellow_background"><b>理解其结构对网络爬虫至关重要</b></span><span class="notion-yellow_background">。</span></div><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c8041a2c0d6dd59a786f9"><li><code class="notion-inline-code">&lt;html&gt;</code>是HTML页面的根元素</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c807fa889de2e3e62fff7"><li><code class="notion-inline-code">&lt;head&gt;</code>包含网页的元信息</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c8005a0ddd23e800d70b1"><li><code class="notion-inline-code">&lt;body&gt;</code>包含网页的主要内容</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c80fd9182d464824cdcc5"><li><code class="notion-inline-code">&lt;h3&gt;</code>定义三级标题，使文本变大并加粗</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c80aaab9ee9a3ebcf7ef0"><li><code class="notion-inline-code">&lt;p&gt;</code>定义段落内容</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c80be8e16d16d134a9697" data-id="1d9cfca7820c80be8e16d16d134a9697"><span><div id="1d9cfca7820c80be8e16d16d134a9697" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c80be8e16d16d134a9697" title="HTML标签的组成"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>HTML标签的组成</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c804ca9d7ed3b4067aa67">HTML标签定义了网页内容的结构，并可包含多个属性。</div><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c80f3bcfff1c5d737dac0"><li>每个HTML标签都有开始标签和结束标签</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c8087b68ef28e04492e02"><li>标签都有特定的名称（如<code class="notion-inline-code">&lt;a&gt;</code>表示链接标签）</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c80f0b307da9bf315c274"><li>标签可以包含属性，通过名称和值对为标签提供额外信息</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c80c093e2d11e6c5e84ed" data-id="1d9cfca7820c80c093e2d11e6c5e84ed"><span><div id="1d9cfca7820c80c093e2d11e6c5e84ed" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c80c093e2d11e6c5e84ed" title="HTML文档树"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>HTML文档树</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c807e8165f7dda595c5b0"><span class="notion-yellow_background">HTML文档可以视为一个由标签构成的树状结构。</span></div><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c80fcb50cdeb56717955f"><li>标签可以包含文本和其他标签，形成父子关系</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c8047b05ed1d69de0e611"><li>同级标签互为兄弟节点</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c808c9bbde005c048f7a3"><li>例如，<code class="notion-inline-code">&lt;html&gt;</code>标签包含<code class="notion-inline-code">&lt;head&gt;</code>和<code class="notion-inline-code">&lt;body&gt;</code>标签作为子节点，而<code class="notion-inline-code">&lt;head&gt;</code>和<code class="notion-inline-code">&lt;body&gt;</code>互为兄弟节点</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1d9cfca7820c802da445ee9b96715fe7"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aaf9d2d66-2301-4e62-a064-79599f00ebf5%3Aa2f144ed-5c0a-48cf-b867-c1d1de9377f6.png?table=block&amp;id=1d9cfca7-820c-802d-a445-ee9b96715fe7&amp;t=1d9cfca7-820c-802d-a445-ee9b96715fe7" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c80f987b3c7799731e932" data-id="1d9cfca7820c80f987b3c7799731e932"><span><div id="1d9cfca7820c80f987b3c7799731e932" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c80f987b3c7799731e932" title="HTML表格"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>HTML表格</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c8034817fed60327f23b3">HTML表格是展示结构化数据的重要工具。</div><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c8083bd69fd890e244d95"><li>使用<code class="notion-inline-code">&lt;table&gt;</code>标签创建表格</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c80a9b388c76c05a65c07"><li>使用<code class="notion-inline-code">&lt;tr&gt;</code>标签定义表格行</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c80498247da7a37a721e9"><li>使用<code class="notion-inline-code">&lt;th&gt;</code>标签定义表头单元格</li></ul><ul class="notion-list notion-list-disc notion-block-1d9cfca7820c808190f5c784b43bd6ed"><li>使用<code class="notion-inline-code">&lt;td&gt;</code>标签定义普通单元格</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1d9cfca7820c80878856f145fe826889"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Afccc4d00-ad86-4f4d-b559-11f8a670303c%3Ab2eba545-3415-42e8-ad83-a489f0b7157e.png?table=block&amp;id=1d9cfca7-820c-8087-8856-f145fe826889&amp;t=1d9cfca7-820c-8087-8856-f145fe826889" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d9cfca7820c8018921cf25ecf61ad14" data-id="1d9cfca7820c8018921cf25ecf61ad14"><span><div id="1d9cfca7820c8018921cf25ecf61ad14" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c8018921cf25ecf61ad14" title="网络爬虫"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>网络爬虫</b></span></span></h2><div class="notion-text notion-block-1d9cfca7820c80b8ac3fdae596feab37">网络爬虫使用Python从网页中提取信息，可以节省时间并实现数据收集自动化。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c804c8155fe24bd48d6e8" data-id="1d9cfca7820c804c8155fe24bd48d6e8"><span><div id="1d9cfca7820c804c8155fe24bd48d6e8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c804c8155fe24bd48d6e8" title="所需工具"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>所需工具</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c805ca8e1df6d66e250ef">网页抓取主要需要两个Python模块：Requests和BeautifulSoup。请确保在开始前已安装这些模块。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c80058d9deed8475cd3e1" data-id="1d9cfca7820c80058d9deed8475cd3e1"><span><div id="1d9cfca7820c80058d9deed8475cd3e1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c80058d9deed8475cd3e1" title="获取和解析HTML"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>获取和解析HTML</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c8004af15c22938c5cf79">以下是使用BeautifulSoup解析网页内容的基本步骤：</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c804783f9fb49e5bfe3f1" data-id="1d9cfca7820c804783f9fb49e5bfe3f1"><span><div id="1d9cfca7820c804783f9fb49e5bfe3f1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c804783f9fb49e5bfe3f1" title="导航HTML结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>导航HTML结构</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c80d68f50f5376d109f02">BeautifulSoup将HTML内容转换为树状结构，便于导航。您可以使用find_all等函数来查找和提取特定的HTML元素。例如，查找所有链接标签并打印其文本内容：</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c804fbb42c315c52aec89" data-id="1d9cfca7820c804fbb42c315c52aec89"><span><div id="1d9cfca7820c804fbb42c315c52aec89" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c804fbb42c315c52aec89" title="自定义数据提取"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>自定义数据提取</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c8088ac6df48359344fe5">网络爬虫可以根据需求浏览HTML结构并提取特定信息，这通常涉及在HTML文档中查找特定的标签、属性或文本内容。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c80129c62c9d55800844d" data-id="1d9cfca7820c80129c62c9d55800844d"><span><div id="1d9cfca7820c80129c62c9d55800844d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c80129c62c9d55800844d" title="使用BeautifulSoup进行HTML解析"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>使用BeautifulSoup进行HTML解析</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c808da652f50e25ad1905">BeautifulSoup是一个强大的HTML解析工具，它能够根据标签、属性或文本查找元素，简化了信息提取的过程。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d9cfca7820c801eb901e65ae02480c7" data-id="1d9cfca7820c801eb901e65ae02480c7"><span><div id="1d9cfca7820c801eb901e65ae02480c7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c801eb901e65ae02480c7" title="使用pandas的read_html进行表格提取"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>使用pandas的read_html进行表格提取</b></span></span></h3><div class="notion-text notion-block-1d9cfca7820c80c2a276c529545a36d4">Pandas库提供了read_html函数，可以自动从网页中提取表格数据，并将其转换为便于分析的格式，类似于将网页表格导入电子表格。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d9cfca7820c8090b754f9a0f6c48bb4" data-id="1d9cfca7820c8090b754f9a0f6c48bb4"><span><div id="1d9cfca7820c8090b754f9a0f6c48bb4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d9cfca7820c8090b754f9a0f6c48bb4" title="结论"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>结论</b></span></span></h2><hr class="notion-hr notion-block-1d9cfca7820c80af9fe0d458090b849b"/><div class="notion-text notion-block-1d9cfca7820c803e9ebae5d1ba56343b">本文介绍了使用BeautifulSoup和Pandas进行网页抓取的基础知识，重点讲解了元素提取和表格处理。BeautifulSoup简化了HTML解析过程，而Pandas的read_html功能使表格数据提取变得便捷。我们还强调了遵守网站使用条款进行负责任的网页抓取的重要性。掌握这些知识后，您就能够进行准确的数据提取工作。</div><div class="notion-text notion-block-1d9cfca7820c80f58835db119f583bc8"><b>作者</b></div><div class="notion-text notion-block-1d9cfca7820c803bb681fbdcd8397674">Akansha Yadav</div><div class="notion-blank notion-block-1d9cfca7820c80698a6dc20e6061ac30"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[使用独立成分分析（ICA）清理伪影]]></title>
            <link>https://tangly1024.com/article/preproc-reject_ica</link>
            <guid>https://tangly1024.com/article/preproc-reject_ica</guid>
            <pubDate>Thu, 17 Apr 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1d8cfca7820c8019a744e787480a645e"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d8cfca7820c800fb40cfb1d0e4a3201" data-id="1d8cfca7820c800fb40cfb1d0e4a3201"><span><div id="1d8cfca7820c800fb40cfb1d0e4a3201" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c800fb40cfb1d0e4a3201" title="引言"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">引言</span></span></h2><div class="notion-text notion-block-1d8cfca7820c80bba5eae87c71f354cf">在本教程中，我们将演示如何在<a class="notion-link" href="https://download.fieldtriptoolbox.org/tutorial/ArtifactMEG.zip" target="_blank" rel="noopener noreferrer">ArtifactMEG.zip</a>示例MEG数据集上进行ICA清理。这是一个没有明确实验任务的静息态记录，但在记录过程中，受试者特意制造了某些类型的伪影，比如眨眼、来回看、做头部运动，以及咬牙以在颌肌中产生肌电活动。</div><div class="notion-text notion-block-1d8cfca7820c80b29f95ed15f3a64de2">该数据集不仅包含MEG数据，还包含来自EOG和ECG的独立双极记录，以及记录颈部和颌部肌肉活动的两个双极EMG通道。原则上，我们可以使用这些额外的通道来查找伪影，或促进甚至自动识别ICA伪影成分。在接下来的内容中，我们将<em>不</em>使用EOG、ECG和EMG通道，我们只展示如何在MEG通道上使用ICA。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d8cfca7820c80779d7ada8ab73790d3" data-id="1d8cfca7820c80779d7ada8ab73790d3"><span><div id="1d8cfca7820c80779d7ada8ab73790d3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c80779d7ada8ab73790d3" title="背景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">背景</span></span></h2><div class="notion-text notion-block-1d8cfca7820c809b9cf0c147d6e5b0b5">独立成分分析（ICA）是一种时空分解策略，它假设EEG或MEG的潜在信源具有固定的空间投射到各个通道，并且在时间上最大程度地独立。<span class="notion-yellow_background">使用ICA可以估计</span><span class="notion-yellow_background"><b>与通道数量相等</b></span><span class="notion-yellow_background">的成分数。</span>我们知道神经元信源的数量远多于通道数量，特别是在记录时间很长的情况下。因此，ICA分解只能对最显著的独立成分进行近似。我们也知道，数据中显著的伪影贡献通常相当有限，这意味着我们可能只需要少数几个成分就能解释这些伪影。在ICA分解之后，我们可以识别出伪影成分，并将其他所有成分反投影到通道层面，从而排除伪影。</div><div class="notion-text notion-block-1d8cfca7820c8039b083e3ee969e46e4">由于ICA假设信源在空间上是固定的，且只能估计有限的信源集，我们<span class="notion-yellow_background">应该尽量预处理数据，以避免ICA成分被简单的数据伪影&quot;占用&quot;</span>。如果你的受试者在实验尚未开始的前几分钟仍在移动，你会希望将该部分数据从ICA分解中排除。</div><div class="notion-text notion-block-1d8cfca7820c80cfa546f91336bd605f">出于效率考虑，我们通常通过首先识别感兴趣的试次并仅将这些数据读入内存来进行预处理。然而，某些典型的伪影可能在试次间隔中更为频繁，例如当受试者不需要保持注视时更可能眨眼或做眼跳。因此，包含这些试次间隔可以有助于识别与眼动相关的成分。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d8cfca7820c80b98e07d98c53adfad3" data-id="1d8cfca7820c80b98e07d98c53adfad3"><span><div id="1d8cfca7820c80b98e07d98c53adfad3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c80b98e07d98c53adfad3" title="程序"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">程序</span></span></h2><div class="notion-text notion-block-1d8cfca7820c80248fe7c312a9fa1c48">要使用ICA清理MEG数据，我们将遵循以下程序</div><ul class="notion-list notion-list-disc notion-block-1d8cfca7820c807db048dc5572782064"><li>使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_preprocessing" target="_blank" rel="noopener noreferrer">ft_preprocessing</a></b>进行最少预处理并读取数据</li></ul><ul class="notion-list notion-list-disc notion-block-1d8cfca7820c80bab6dfc333d87d20e3"><li>使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectvisual" target="_blank" rel="noopener noreferrer">ft_rejectvisual</a></b>或<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_databrowser" target="_blank" rel="noopener noreferrer">ft_databrowser</a></b>（或两者）去除不频繁的非典型伪影</li></ul><ul class="notion-list notion-list-disc notion-block-1d8cfca7820c80a5887fd2ea773307a9"><li>使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_componentanalysis" target="_blank" rel="noopener noreferrer">ft_componentanalysis</a></b>进行数据的ICA分解</li></ul><ul class="notion-list notion-list-disc notion-block-1d8cfca7820c8031b230d12691bb7a49"><li>使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_topoplotIC" target="_blank" rel="noopener noreferrer">ft_topoplotIC</a></b>和<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_databrowser" target="_blank" rel="noopener noreferrer">ft_databrowser</a></b>识别反映眼动和心跳伪影的成分</li></ul><ul class="notion-list notion-list-disc notion-block-1d8cfca7820c80399626e6913c1df647"><li>使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectcomponent" target="_blank" rel="noopener noreferrer">ft_rejectcomponent</a></b>移除这些成分并反投影数据</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1d8cfca7820c80fea725c0461ed88ad5"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.fieldtriptoolbox.org/assets/img/tutorial/ica_artifact_cleaning/figure1.png?spaceId=f7e1a080-1756-44f2-8739-b3d5efe66c53&amp;t=1d8cfca7-820c-80fe-a725-c0461ed88ad5" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1d8cfca7820c8063a6d4ce033969513a">在流程示意图中，您可以看到我们将使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectvisual" target="_blank" rel="noopener noreferrer">ft_rejectvisual</a></b>或<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_databrowser" target="_blank" rel="noopener noreferrer">ft_databrowser</a></b>来识别非典型伪影。数据浏览器将帮助您深入理解数据的特征，这在您不是亲自记录数据的情况下尤其重要。可视化概要模式可以非常快速且高效，这对于具有大量通道或较长时间的数据集特别重要。</div><div class="notion-text notion-block-1d8cfca7820c806cb931d5631d57becf">此外，流程示意图显示，如果我们在完成ICA<em>之后</em>发现非典型伪影或坏通道，我们可能需要返回到<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectvisual" target="_blank" rel="noopener noreferrer">ft_rejectvisual</a></b>或<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_databrowser" target="_blank" rel="noopener noreferrer">ft_databrowser</a></b>。在这种情况下，我们需要重复初始清理并重新进行ICA。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d8cfca7820c80cf8e97f1c4f5b2961f" data-id="1d8cfca7820c80cf8e97f1c4f5b2961f"><span><div id="1d8cfca7820c80cf8e97f1c4f5b2961f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c80cf8e97f1c4f5b2961f" title="预处理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">预处理</span></span></h2><div class="notion-text notion-block-1d8cfca7820c80388664fc928f354665">MEG数据是使用151通道CTF系统记录的。虽然数据是连续的，但CTF数据集被组织成10秒的试次。由于试次之间没有不连续性，我们可以将其视为连续记录。</div><div class="notion-text notion-block-1d8cfca7820c800ca3b3f22ae44de76e">要将此数据集加载到MATLAB中并使用FieldTrip进行预处理，请使用：</div><div class="notion-text notion-block-1d8cfca7820c80b99f00f2d840699705">ICA分解可能需要很长时间，特别是当您需要多次执行时。如果耗时太长，您可以考虑将数据降采样到较低的采样率，这里从1200Hz降至300Hz。使用降采样后的数据集，您可以估计ICA成分，然后从原始数据中移除这些成分。但是，您应该意识到降采样可能会影响某些数据特征和伪影。例如，高频肌肉伪影的捕获效果会降低。这导致这些伪影的去除可能也不那么理想。</div><div class="notion-text notion-block-1d8cfca7820c8075b917e5f281d8dbb5">出于本教程的目的，并且由于我们想让您尝试各种设置，我们将继续使用降采样后的数据。如果您在处理自己的数据时，请尽量使用原始数据而不是降采样数据；这将提高分解的质量。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d8cfca7820c80ddb335c73cb8403011" data-id="1d8cfca7820c80ddb335c73cb8403011"><span><div id="1d8cfca7820c80ddb335c73cb8403011" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c80ddb335c73cb8403011" title="去除非典型伪影"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">去除非典型伪影</span></span></h2><div class="notion-text notion-block-1d8cfca7820c80dfbe81ee23fe90a31f"><span class="notion-yellow_background">ICA假设有固定成分的混合，且</span><span class="notion-yellow_background"><b>无法估计超过通道数量</b></span><span class="notion-yellow_background">的成分。</span>如果您有一些<span class="notion-inline-underscore">不频繁</span>的非典型伪影，这些将在成分中表现出来。这会导致损失一些用于有趣内容的成分，并可能导致<span class="notion-inline-underscore">次优</span>的分解。因此，我们<span class="notion-yellow_background">首先要去除稀疏的非典型伪影</span>。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d8cfca7820c808390b0d8c53e5e1d26" data-id="1d8cfca7820c808390b0d8c53e5e1d26"><span><div id="1d8cfca7820c808390b0d8c53e5e1d26" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c808390b0d8c53e5e1d26" title="使用ft_databrowser"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">使用ft_databrowser</span></span></h3><div class="notion-text notion-block-1d8cfca7820c804d8e5afb4777f43442">我们可以使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_databrowser" target="_blank" rel="noopener noreferrer">ft_databrowser</a></b>来查看数据。由于我们在寻找可能出现在数据任何位置的不频繁伪影，我们应该查看<em>所有</em>通道和<em>完整</em>的时间过程。在时间上&quot;缩小&quot;视图会有帮助，这样我们可以一次看到较大的数据时间窗口。</div><div class="notion-text notion-block-1d8cfca7820c803fa506d4020d817a1f">注意，我们对<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_databrowser" target="_blank" rel="noopener noreferrer">ft_databrowser</a></b>的输出<code class="notion-inline-code">cfg</code>感兴趣：它将包含我们标记的伪影。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1d8cfca7820c80b68c5af8aac4545f9c"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.fieldtriptoolbox.org/assets/img/tutorial/ica_artifact_cleaning/figure2.png?spaceId=f7e1a080-1756-44f2-8739-b3d5efe66c53&amp;t=1d8cfca7-820c-80b6-8c5a-f8aac4545f9c" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1d8cfca7820c80f89b7ae5d537c9d9aa">在记录的最后部分出现了一些异常现象：CTF采集软件以10秒为块写入数据。如果在最后一个数据块完成之前结束采集（这种情况总是会发生），该块的剩余部分将被写入磁盘为全零值。因此，您应该将数据的最后部分标记为伪影。</div><div class="notion-text notion-block-1d8cfca7820c80ffacd2e521a307f4cf">在MLT024通道（以及同时在其他一些通道）中，您可以观察到所谓的SQUID跳变。这些是由SQUID硬件不稳定导致的，造成信号中出现一个磁通量子的巨大变化。这些表现为大幅度跳变。请识别MLT024中的每个跳变并将其标记为伪影。</div><div class="notion-text notion-block-1d8cfca7820c80c1bf5fce5a46780d07">作为参考，以下是我在降采样数据中识别的伪影：</div><div class="notion-text notion-block-1d8cfca7820c802ba827e02fd3abefda">以下是这些伪影在连续记录中出现的时间（以秒为单位）：</div><div class="notion-text notion-block-1d8cfca7820c80f88357c5231f7ea19d">请注意，如果在初始预处理时没有应用高通滤波器，并且我们没有对数据进行降采样，这些跳变会更容易识别。特别是高通滤波器在这里比较麻烦：它使跳变扩散到更长的时间范围。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d8cfca7820c80a2b5bed6090e5f20ad" data-id="1d8cfca7820c80a2b5bed6090e5f20ad"><span><div id="1d8cfca7820c80a2b5bed6090e5f20ad" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c80a2b5bed6090e5f20ad" title="练习"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">练习</span></span></h3><div class="notion-text notion-block-1d8cfca7820c809c8576c1735cd2eb95">预处理和滤波用于减少伪影（如漂移），因此会使伪影不太明显。未经预处理的数据能最好地展示伪影的特征。</div><div class="notion-text notion-block-1d8cfca7820c80bf91e4c2955fb2ebcf">在原始数据上重复使用ft_databrowser进行检查，不要使用高通滤波器和重采样。这需要您重新调用ft_preprocessing。查看记录开始后约178秒处以<code class="notion-inline-code">MTL*</code>开头的通道，并将跳变与您在经过滤波和降采样的数据中观察到的跳变进行比较。</div><div class="notion-text notion-block-1d8cfca7820c80848404ccf49dab0c3a">请注意，伪影（和试次）是以采样点表示的，所以您可以查看记录中的相同时间点，但不能使用相同的采样点数来引用原始数据和降采样数据中的伪影。</div><div class="notion-text notion-block-1d8cfca7820c80e98fb9f259c9517280">在识别非典型伪影之后，您可以将它们从后续分析中移除。出于本教程的目的并且是在处理连续数据，我们不会将其剔除，而是用NaN值（非数字值）填充。在连续数据上，也可以使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectartifact" target="_blank" rel="noopener noreferrer">ft_rejectartifact</a></b>，配合选项<code class="notion-inline-code">cfg.artfctdef.reject = &#x27;partial&#x27;</code>。这里我们将使用选项<code class="notion-inline-code">nan</code>。</div><div class="notion-text notion-block-1d8cfca7820c80559e7be8f1920ebc15">注意，这里我们以不同方式重复使用<code class="notion-inline-code">data</code>和<code class="notion-inline-code">data_clean</code>变量，因为我们在来回演示不同的数据处理和清理方法。不要对清理后的数据代表什么感到困惑。</div><div class="notion-text notion-block-1d8cfca7820c80fd9b3ae98622aba8b8">要回到原始数据，您随时可以执行<code class="notion-inline-code">data = data_orig</code>。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1d8cfca7820c8028ae90f5f25cc002f8" data-id="1d8cfca7820c8028ae90f5f25cc002f8"><span><div id="1d8cfca7820c8028ae90f5f25cc002f8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c8028ae90f5f25cc002f8" title="使用ft_rejectvisual"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">使用ft_rejectvisual</span></span></h3><div class="notion-text notion-block-1d8cfca7820c80498d84d4aaec3ad4d2">移除不频繁和非典型伪影的另一种策略是使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectvisual" target="_blank" rel="noopener noreferrer">ft_rejectvisual</a></b>。但是，这需要将数据分段为试次。在这种情况下，我们可以将数据分段为一秒长的连续片段。</div><div class="notion-text notion-block-1d8cfca7820c803687ccf4952548a130">注意，这里我们依赖于预处理期间的<code class="notion-inline-code">cfg.hpfilter=&#x27;yes&#x27;</code>选项。<span class="notion-yellow_background">信号中的</span><span class="notion-yellow_background"><b>低频漂移并不重要，而且会影响ICA分解</b></span><span class="notion-yellow_background">；因此我们无论如何都要去除它。</span>由于我们处理的是连续数据，我们使用高通滤波器。如果我们最初就是从基于试次的数据开始，那么在最初预处理阶段使用<code class="notion-inline-code">cfg.demean=&#x27;yes&#x27;</code>会是一个更简单的选择。</div><div class="notion-text notion-block-1d8cfca7820c80dd9eb8f25c8486687f">现在数据被切分成每秒一段的片段（即试次），我们可以识别具有非典型伪影的片段。为此，我们使用带有summary方法的<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectvisual" target="_blank" rel="noopener noreferrer">ft_rejectvisual</a></b>。这将直接返回清理后的数据。由于我们不想从后续分析中排除任何通道，我们指定要保留所有通道。由于我们希望数据之后能够再次连续表示，我们指定用NaN替换伪影。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1d8cfca7820c8034ae8bf75ad860e153"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.fieldtriptoolbox.org/assets/img/tutorial/ica_artifact_cleaning/figure3.png?spaceId=f7e1a080-1756-44f2-8739-b3d5efe66c53&amp;t=1d8cfca7-820c-8034-ae8b-f75ad860e153" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1d8cfca7820c8065b657c9d5336dfa18">现在我们可以将分段数据重新&quot;缝合&quot;成连续表示：</div><div class="notion-text notion-block-1d8cfca7820c807c980afcd8d6a729d3">如果您在ft_databrowser中检查<code class="notion-inline-code">data_clean</code>，您会看到数据的某些部分不可见，这些部分已被NaN值替代。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d8cfca7820c805db82bcd9f804616fb" data-id="1d8cfca7820c805db82bcd9f804616fb"><span><div id="1d8cfca7820c805db82bcd9f804616fb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c805db82bcd9f804616fb" title="ICA分解"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">ICA分解</span></span></h2><div class="notion-text notion-block-1d8cfca7820c80beafd9ddc577c58d56">我们使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_componentanalysis" target="_blank" rel="noopener noreferrer">ft_componentanalysis</a></b>进行ICA分解。它有许多选项，支持不同的数据分解方法，包括PCA和不同的ICA算法。这里我们将使用来自EEGLAB的Extended Infomax算法，即<code class="notion-inline-code">runica</code>方法。您不需要安装EEGLAB，所需的函数都包含在<code class="notion-inline-code">fieldtrip/external</code>目录中。</div><div class="notion-text notion-block-1d8cfca7820c80029f5cebde1849b39f">您可以考虑其他ICA算法。例如，<code class="notion-inline-code">fastica</code>算法速度快，不需要对数据进行完整分解；它也可以只识别少量成分。<span class="notion-yellow_background"><code class="notion-inline-code">fastica</code></span><span class="notion-yellow_background">首先识别的成分是具有</span><span class="notion-yellow_background"><b>最大方差</b></span><span class="notion-yellow_background">的成分，这些通常是伪影。</span><span class="notion-yellow_background"><code class="notion-inline-code">amica</code></span><span class="notion-yellow_background">算法是识别</span><span class="notion-yellow_background"><b>生物物理学上合理</b></span><span class="notion-yellow_background">的ICA成分的最佳算法之一。它产生的成分比</span><span class="notion-yellow_background"><code class="notion-inline-code">runica</code></span><em><span class="notion-yellow_background">更加</span></em><span class="notion-yellow_background">独立。</span></div><div class="notion-text notion-block-1d8cfca7820c80ce9faad01f6dc82678">Delorme等人的论文<a class="notion-link" href="https://doi.org/10.1371/journal.pone.0030135" target="_blank" rel="noopener noreferrer">独立EEG源是偶极子的。</a>PLoS One (2012)比较了多种ICA算法，并得出结论：更独立的成分也更具偶极子特性，这与许多最大独立EEG成分是单个紧凑皮层区域内部分同步局部皮层场活动的体积传导投影的解释相符。</div><div class="notion-text notion-block-1d8cfca7820c805ebf53c9185f3ccfdf">另一种不完全盲目的成分分析策略是&quot;去噪源分离&quot;或<code class="notion-inline-code">dss</code>，这种方法在ICA分解过程中最大化特定的显式特征。如果您预先知道EOG或ECG伪影的样子，您可以使用<code class="notion-inline-code">dss</code>来利用这一点并高效地清理数据。</div><div class="notion-text notion-block-1d8cfca7820c80d2bd47e846bd8117a7">要执行ICA分解，您可以使用以下代码。这里我们在分解之前使用PCA降维来加快处理速度，以适应本教程的目的。请注意，PCA降维可能会对分解质量产生负面影响，所以通常最好在计算运行时保持更多的耐心。</div><div class="notion-text notion-block-1d8cfca7820c80f4a3bdefe49b02abe8">您应该采用类似的方式，这些共同代表了底层源的线性混合。如果您有使用相同参考的EEG和EOG通道，EEG和EOG通道可以一起使用。如果您的EEG使用一个参考而EOG通道是双极性的，则不应将它们组合在单个ICA分解中。当您同时有MEG和EEG数据时，MEG和EEG通道都会检测到大脑和伪影源，但对它们的敏感度不同，对头部相对于MEG头盔运动的效应也有不同的敏感度；在这种情况下，我们也建议分别对MEG和EEG通道使用ICA。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d8cfca7820c8042bbf3e9faa07eb067" data-id="1d8cfca7820c8042bbf3e9faa07eb067"><span><div id="1d8cfca7820c8042bbf3e9faa07eb067" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c8042bbf3e9faa07eb067" title="识别伪影成分"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">识别伪影成分</span></span></h2><div class="notion-text notion-block-1d8cfca7820c80ce9e91ce514c55e50d">分解后的数据结构<code class="notion-inline-code">data_comp</code>表示成分的地形图，即每个源如何投射到通道，以及表示每个源的时间激活。这两者都可用于识别对应于伪影的成分。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1d8cfca7820c808d9909cc8558dfd243"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.fieldtriptoolbox.org/assets/img/tutorial/ica_artifact_cleaning/figure4.png?spaceId=f7e1a080-1756-44f2-8739-b3d5efe66c53&amp;t=1d8cfca7-820c-808d-9909-cc8558dfd243" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1d8cfca7820c808fac32f07b120db38f">有了一些经验，您就可以相对快速地识别可疑的伪影成分。眼动相关的成分在前额通道上呈现局部空间分布，眨眼和垂直眼跳呈对称分布，而水平眼跳则呈现明显的左右模式。MEG中与心跳相关的成分表现为一个非常深的信源，在头盔的左右两侧呈现双极性投射。对于眼动和心跳成分来说，通常都会观察到多个相关成分。您可能需要记下每个可疑成分的编号。</div><div class="notion-text notion-block-1d8cfca7820c80dbaef5c505019d1426">在上图中，成分10和12看起来是眼动相关的成分。成分5和6可能仍与MLT24及其相邻通道的SQUID跳变有关。在这种情况下，没有明显的心跳相关成分。</div><div class="notion-text notion-block-1d8cfca7820c8003892df33de37f9049">接下来您可以查看成分的时间进程。心跳相关的成分会显示规律的心跳，在分解的最初几秒内就应该能够识别出来。眼动相关的成分只有在受试者眨眼或做眼跳时才会在时间序列中出现偏移；要看到这些，您可能需要滚动浏览数据或缩小查看更大段的数据。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1d8cfca7820c80a19dfddd771000d714"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.fieldtriptoolbox.org/assets/img/tutorial/ica_artifact_cleaning/figure5.png?spaceId=f7e1a080-1756-44f2-8739-b3d5efe66c53&amp;t=1d8cfca7-820c-80a1-9dfd-dd771000d714" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1d8cfca7820c800aae73e663a461c72e">再次记下代表伪影的成分。</div><div class="notion-text notion-block-1d8cfca7820c802ab362d00bbf2d7070">请注意，MEG中的眼动成分看起来与EEG中的眼动成分不同，这是由于MEG通道的方向所致：头部左侧的通道指向右侧，右侧的通道指向左侧，这导致它们的&quot;极性&quot;发生翻转。而对于EEG电极，所有额叶电极具有相同的极性。结合成分时间序列，您可以确定哪个成分反映水平运动，哪个反映眨眼。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d8cfca7820c808bb0cbc5bdc94ad933" data-id="1d8cfca7820c808bb0cbc5bdc94ad933"><span><div id="1d8cfca7820c808bb0cbc5bdc94ad933" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c808bb0cbc5bdc94ad933" title="识别不良通道"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">识别不良通道</span></span></h2><div class="notion-text notion-block-1d8cfca7820c80e9a722ee80d2e77aae">EEG和MEG都对生理活动给出相对模糊的表示。在空间上高度局部化的成分，即仅在单个或极少数通道上活跃的成分，不太可能代表来自大脑或心脏的生理源。如果您之前没有移除SQUID跳变，这些会表现为高度局部化的伪影。移动的EEG电极或阻抗突然变化的电极也可能表现为高度局部化。</div><div class="notion-text notion-block-1d8cfca7820c80e5a85ae467ac7214c3">如果发生这种情况，您可以使用ft_databrowser查看成分时间序列，以确定跳变或其他短暂伪影出现的时间，您可以将该时间窗标记为视觉伪影，并使用ft_databrowser的输出<code class="notion-inline-code">cfg</code>返回并在ICA分解之前从数据中删除该部分（或像我们在这里做的那样用NaN填充该部分）。随后，您需要重新进行ICA分解，并再次检查成分地形图和时间序列。</div><div class="notion-text notion-block-1d8cfca7820c800ebf4eea94003e564e">也可能会发现一个或几个成分在空间上高度局部化，这是由于相应的通道在较长时间段内状态不佳或有噪声。在这种情况下，您需要从数据中剔除这些通道，并在没有这些通道的情况下进行ICA分解和反投影。如果许多受试者都有不良通道，且/或这些不良通道在受试者之间变化很大，您可能需要使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_channelrepair" target="_blank" rel="noopener noreferrer">ft_channelrepair</a></b>对这些通道进行插值；这是在成分反投影<em>之后</em>获得清洁的通道级数据时要做的事情，但要在进行时锁ERP或频率/时频分析<em>之前</em>完成。</div><div class="notion-text notion-block-1d8cfca7820c8074bf83f24b19d018cb">使用高密度EEG时，您有时可能会看到非常局部化的肌肉抽搐，特别是在颞区，但也可能出现在头皮的其他部位。这些可能较少或较多发生，这取决于您的受试者和任务。尽管这些在空间上相当紧凑，但它们确实代表了一个生理源，ICA是去除它们的适当技术。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d8cfca7820c805ebb74fda26c095338" data-id="1d8cfca7820c805ebb74fda26c095338"><span><div id="1d8cfca7820c805ebb74fda26c095338" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c805ebb74fda26c095338" title="移除伪影成分"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">移除伪影成分</span></span></h2><div class="notion-text notion-block-1d8cfca7820c80b799ffdc0b66b2150d">在识别出伪影成分后，您可以使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectcomponent" target="_blank" rel="noopener noreferrer">ft_rejectcomponent</a></b>将所有成分反投影到数据的通道级表示，同时排除伪影。</div><div class="notion-text notion-block-1d8cfca7820c80fe8c42d6dded365fb5">如果您在数据重采样版本上计算了成分，您也可以使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectcomponent" target="_blank" rel="noopener noreferrer">ft_rejectcomponent</a></b>将伪影从原始数据中投影出去。这只需要成分地形图，然后将其应用于以原始采样率解混和重混数据。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d8cfca7820c804a9756c85e3049f7c4" data-id="1d8cfca7820c804a9756c85e3049f7c4"><span><div id="1d8cfca7820c804a9756c85e3049f7c4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c804a9756c85e3049f7c4" title="总结和结论"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">总结和结论</span></span></h2><div class="notion-text notion-block-1d8cfca7820c803b8806c21158150d73">在本教程中，我们研究了如何准备数据进行ICA分解，如何处理不频繁和非典型伪影。我们简要讨论了不同的ICA方法，并使用特定方法展示了如何通过降采样数据和减少估计的成分数量来加快ICA速度。给定ICA分解后，我们演示了如何可视化它们并识别伪影，并讨论了如果得到非常局部的成分（在空间和/或时间上），您可能需要删除数据的该部分并重新开始。在获得干净的ICA分解后，我们解释了如何将成分反投影到通道级表示以进行进一步分析，或如何使用成分来清理原始数据。</div><div class="notion-text notion-block-1d8cfca7820c80019780f5df1adcca6a">在本教程中我们<em>没有</em>展示的是，您还可以<span class="notion-yellow_background">将ICA成分解释为大脑中的源</span>。正如可以对伪影成分使用所有FieldTrip绘图和分析策略一样，也可以分析大脑成分。所有成分都表示为通道时间序列，可以应用所有通道级分析。例如，在将数据分段为刺激锁定试次后，您可以使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_timelockanalysis" target="_blank" rel="noopener noreferrer">ft_timelockanalysis</a></b>、<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_freqanalysis" target="_blank" rel="noopener noreferrer">ft_freqanalysis</a></b>或<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_componentanalysis" target="_blank" rel="noopener noreferrer">ft_componentanalysis</a></b>来研究每个感兴趣的成分，并使用统计方法比较条件之间的差异。</div><div class="notion-text notion-block-1d8cfca7820c80468580c47c5be9d769">分解不仅给出了成分时间序列，还给出了它们的地形图。除了用这些来识别伪影外，您还可以清楚地识别代表大脑活动的成分。您可以使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_dipolefitting" target="_blank" rel="noopener noreferrer">ft_dipolefitting</a></b>用简单的偶极子模型定位这些成分，或使用<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_sourceanalysis" target="_blank" rel="noopener noreferrer">ft_sourceanalysis</a></b>用分布式模型定位它们。您不能（轻易）应用的唯一源重建策略是波束成形，因为在成分级别您只有一个地形图，没有数据协方差矩阵。作为空间滤波技术，波束成形与独立成分分析太相似（尽管基于生物物理模型和非相关而不是独立源的假设）。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d8cfca7820c8077ad6affcdfb300ca0" data-id="1d8cfca7820c8077ad6affcdfb300ca0"><span><div id="1d8cfca7820c8077ad6affcdfb300ca0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d8cfca7820c8077ad6affcdfb300ca0" title="建议进一步阅读"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">建议进一步阅读</span></span></h2><div class="notion-text notion-block-1d8cfca7820c80c88642c992a671a63f">关于如何在FieldTrip中一般处理伪影的介绍，您应该看看<a class="notion-link" href="/8d6e1714daac4caa8374c202d995e7b0">伪影处理简介</a>教程。在本教程使用ICA清理数据之后，您可能想回去看看<a class="notion-link" href="/b384e9be41b948d782c3e562a6582a38">视觉伪影拒绝</a>和<a class="notion-link" href="/bfb3afff5d284c46852865ef7d5c5c39">自动伪影拒绝</a>教程。</div><div class="notion-blank notion-block-1d8cfca7820c80fe9954c0ddb054e8a9"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[伪影处理简介]]></title>
            <link>https://tangly1024.com/article/preproc_reject_intro</link>
            <guid>https://tangly1024.com/article/preproc_reject_intro</guid>
            <pubDate>Sun, 16 Apr 2023 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-8d6e1714daac4caa8374c202d995e7b0"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-2800043d0ce143cf949bda7a082168e4">本教程解释了有关如何处理伪影的一般方法。</div><div class="notion-text notion-red_background notion-block-cd46fcd7d2d64223a27b0f603b23ac52">由于 FieldTrip 支持许多不同采集系统的数据，因此您数据中的特定伪像可能与此处演示和讨论的示例有很大不同。因此，您应该了解前面描述的不同方法和伪影拒绝（自动 / 手动）程序的可变性。

在自动化程序结束时，考虑在拒绝后始终目视检查您的数据。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-995daf8ecea04b839ed2a56956855ede" data-id="995daf8ecea04b839ed2a56956855ede"><span><div id="995daf8ecea04b839ed2a56956855ede" class="notion-header-anchor"></div><a class="notion-hash-link" href="#995daf8ecea04b839ed2a56956855ede" title="背景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>背景</b></span></span></h3><div class="notion-text notion-block-491db6545d6745fb92ddbbd1a914be8e">一般来说，artifact（美式英语拼写）或 artefact（英式英语拼写）是我们使用 EEG 或 MEG 系统获取的数据中的一些意外或不需要的特征。伪影的起源可以是生理性的或非生理性的。</div><div class="notion-text notion-block-a286f5f76c4241e0af5343879ddcdaa4">眨眼是脑电图中出现的生理伪影的一个例子。视网膜带电，眼睛的运动导致头皮电位偏转。这种所谓的眼电图的贡献主要在额叶电极上可见，但当足够仔细地观察时，您可以在所有电极上看到它。非生理性伪影的一个例子是与头皮接触不良的 EEG 电极。相应的 EEG 通道将显示一条平坦的线，或者可能有很多噪音。</div><div class="notion-text notion-block-d2d00a040e944c02b380278bf1d58429">除了考虑伪影的生理或非生理方面外，您还可以考虑伪影是否由参与者的行为（例如，眼球运动）引起，是否由环境中的某些东西（例如，50Hz）引起线路噪声）或是否由设备故障引起（例如，电极连接不良）。行<span class="notion-orange_background">为伪影通常是短暂的，而环境和仪器伪影通常更持久。</span></div><div class="notion-text notion-block-a0458ce96002420f9c0e7bb1f946d264">没有一种最佳的方法来检测伪影：它取决于数据属性、您预计会出现的伪影类型（给定您的记录设置、您的任务和您的参与者）以及您自己的偏好。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-054f30a02d8c492297b2fbf8cead8f15" data-id="054f30a02d8c492297b2fbf8cead8f15"><span><div id="054f30a02d8c492297b2fbf8cead8f15" class="notion-header-anchor"></div><a class="notion-hash-link" href="#054f30a02d8c492297b2fbf8cead8f15" title="FieldTrip 如何管理伪影？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>FieldTrip 如何管理伪影？</b></span></span></h3><div class="notion-text notion-block-3ba103d83b6740369f659267b29294c7">FieldTrip 通过首先识别它们然后删除它们来处理伪影。伪影的检测可以通过目视或使用自动例程或两者的组合来完成。在您知道伪影是什么之后，它们将被以下任一方式移除<div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-929a28e2e57f411db013cdfc353f9893"><li>拒绝包含伪影的数据，例如，对于短暂的伪影或连接不良的 EEG 电极，或</li></ul><ul class="notion-list notion-list-disc notion-block-e4d3823247524b6db4790a977798b83b"><li>从数据中减去伪影的时空贡献，例如，使用滤波器或 ICA</li></ul></div></div><div class="notion-text notion-block-419262d1ba994ce0a76b437862909afd"><span class="notion-orange_background">FieldTrip 中可用于伪影检测的函数取决于您的数据是连续的还是基于试次的（即分段之间有时间间隔）以及您的数据是存储在磁盘上还是已读入内存。</span></div><div class="notion-text notion-block-8f71cede51804fb0ac30fea38cec6103"><em>在分割之前</em>检测连续数据中的伪影允许您应用滤波器（例如，带通滤波器以放大时间通道上的肌肉伪</div><div class="notion-text notion-block-89c2a11a51fa44e4a2dce64a109c2602">影）而不必担心由于滤波器引起的边缘效应（即滤波器振铃）。<em>分割后</em>将数据保存在内存中是一种直观浏览感兴趣的数据段的有效方法，尤其是当您知道试次之间存在伪影时（例如，眨眼期间的 EOG 伪影）。</div><div class="notion-text notion-block-61e5e68f0d3b4737b451894173ad34d1">在不将完整数据读入内存的情况下检测伪影，允许您处理过大而无法一次放入内存的数据集。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-b256aa36d124406396cde5e987da52fd" data-id="b256aa36d124406396cde5e987da52fd"><span><div id="b256aa36d124406396cde5e987da52fd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b256aa36d124406396cde5e987da52fd" title="拒绝带有伪影的片段"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>拒绝带有伪影的片段</b></span></span></h3><div class="notion-text notion-block-a265442f8d67430c89aa306906f5b9c3">通过这种策略，可以识别出被人为因素污染的数据片段，并将其从进一步分析中移除。例如，排除不良通道，或删除带有伪影的试次。您可能不仅要使用此策略来处理伪影，还要处理参与者的不良行为。例如，如果在视觉刺激检测任务中，受试者恰好在（短）刺激出现在屏幕上的那一刻眨眼，那么他很可能没有看到刺激。在那种情况下，排除试验的原因不是因为 EOG 伪影，而是因为受试者在该试次中的大脑活动不是我们感兴趣的。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-b995652bd96b487db14f01edcc77ca7f" data-id="b995652bd96b487db14f01edcc77ca7f"><span><div id="b995652bd96b487db14f01edcc77ca7f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b995652bd96b487db14f01edcc77ca7f" title="手动 / 视觉检测"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>手动 / 视觉检测</b></span></span></h4><div class="notion-text notion-block-57c521a5613645e8a9998f444ca7ac67">在手动 / 视觉伪影检测中，用户通过目视检查数据并识别受影响的试次或数据段和 / 或通道。目视检查会生成一个包含噪声数据段和 / 或通道的列表。</div><div class="notion-text notion-block-3f22e52c07bd40c39849f1698e5b771e">这些功能可用于手动 / 视觉伪影检测：<div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-5ab0d8bcc15a47fc9a1de094c6780da8"><li><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectvisual" target="_blank" rel="noopener noreferrer">ft_rejectvisual</a></b></li></ul><ul class="notion-list notion-list-disc notion-block-d5b3e50331684a4a9a66c51ea133e40a"><li><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_databrowser" target="_blank" rel="noopener noreferrer">ft_databrowser</a></b></li></ul></div></div><div class="notion-text notion-block-b4ee36383b3e4d4baaebe454f0c1788a"><span class="notion-orange_background"><b>ft_rejectvisual </b></span>函数仅适用于已经读入内存的分段数据（即试次）<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectvisual" target="_blank" rel="noopener noreferrer">。</a></b>它允许您通过一次显示所有通道（每个试次），或一次显示所有试次（每个通道），或通过显示所有通道和试次的摘要来浏览 MATLAB 图中的大量数据单图。使用鼠标，您可以选择要删除的试次和 / 或通道。此函数直接返回去除噪声部分的数据，您不必调用 <span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectartifact" target="_blank" rel="noopener noreferrer">ft_rejectartifact</a></b></span><span class="notion-orange_background"><b> </b></span>或 <span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectcomponent" target="_blank" rel="noopener noreferrer">ft_rejectcomponent</a></b></span><span class="notion-orange_background"><b> </b></span>。</div><div class="notion-text notion-blue_background notion-block-7d410bd2f6fb469d92ffcdf09d718861">如果你想在连续数据上使用<span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectvisual" target="_blank" rel="noopener noreferrer">ft_rejectvisual</a></b></span>，你可以先使用 <span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_redefinetrial" target="_blank" rel="noopener noreferrer">ft_redefinetrial</a></b></span><span class="notion-orange_background"><b> </b></span>将它分割成一秒钟的片段，然后调用 <span class="notion-orange_background">ft_rejectvisual</span>。本<a class="notion-link" href="https://www.fieldtriptoolbox.org/faq/how_can_i_process_continuous_data_without_triggers" target="_blank" rel="noopener noreferrer">FAQ</a>中解释了分割连续数据。</div><div class="notion-text notion-block-216541e735874dd48b14858f7223d6d9"><span class="notion-orange_background"><b>ft_databrowser </b></span>函数适用于连续数据和分段数据，适用于仍在磁盘上或已读入内存的数据<b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_databrowser" target="_blank" rel="noopener noreferrer">。</a></b>它允许您浏览数据并使用带有工件的鼠标片段进行标记。与<span class="notion-orange_background"> ft_rejectvisual </span>相反，<span class="notion-orange_background">ft_databrowser 不会返回清理后的数据，也不允许您删除坏通道（尽管您可以将它们从可视化中关闭）</span>。相反，它在输出中返回一个<code class="notion-inline-code">cfg</code>片段列表，表示为相对于记录的开始和结束样本。在检测到带有伪影的片段后，您调用<span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectartifact" target="_blank" rel="noopener noreferrer">ft_rejectartifact</a></b></span><span class="notion-orange_background"><b> </b></span>将它们从您的数据（当数据已在内存中）或从您的试次定义（当数据仍在磁盘上）中删除。</div><div class="notion-text notion-block-87e236d3c05d428f81e20d8080361931">值得注意的是，<span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_databrowser" target="_blank" rel="noopener noreferrer"><span class="notion-inline-underscore">ft_databrowser</span></a></b></span><span class="notion-orange_background"><b><span class="notion-inline-underscore"> </span></b></span><span class="notion-inline-underscore">函数还可用于可视化 ICA 成分的时间进程</span>，从而使您可以轻松识别与眨眼、心跳和线路噪声对应的成分。<span class="notion-orange_background">良好的 ICA 数据分离需要在调用 </span><span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_componentanalysis" target="_blank" rel="noopener noreferrer">ft_componentanalysis</a></b></span><span class="notion-orange_background"><b> 之前</b></span><span class="notion-orange_background">移除非典型伪影（例如，电极移动、SQUID 跳跃）。</span>在确定了哪些是坏成分后，您可以调用<span class="notion-orange_background"> </span><span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectcomponent" target="_blank" rel="noopener noreferrer">ft_rejectcomponent</a></b></span><span class="notion-orange_background"> </span>将数据投影回传感器级别，排除坏成分。</div><div class="notion-text notion-block-f11f06e1a8e9480f92b7754f9967fda8">有关手动处理伪影的更多信息，请参阅<a class="notion-link" href="/98aada100bef42a0888492de3db3a921">视觉伪影拒绝</a>教程。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-a81c09a2ba6e4d59a48ac5d71b386326" data-id="a81c09a2ba6e4d59a48ac5d71b386326"><span><div id="a81c09a2ba6e4d59a48ac5d71b386326" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a81c09a2ba6e4d59a48ac5d71b386326" title="自动检测"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>自动检测</b></span></span></h4><div class="notion-text notion-block-aa0a4aa13aa84ee8ab5b540c4934ade2">为了加快处理许多和 / 或大型数据集，并促进对伪影使用客观标准，FieldTrip 还包括许多用于自动工件检测的功能。<span class="notion-inline-underscore">尽管这些对于行为良好的数据中的众所周知的成分有效，但如果您（还）不了解您的数据，则</span><b><span class="notion-inline-underscore">不应</span></b><span class="notion-inline-underscore">将自动检测功能用作默认方法。</span></div><div class="notion-text notion-block-9feec22da2e04f389ebadafd81282de8">自动伪影检测功能允许对数据应用一些过滤和预处理，使伪影更加明显。为此，通过<code class="notion-inline-code">cfg</code>结构为它们中的每一个预先设置相关参数。</div><div class="notion-text notion-block-3b99c19aa51d4b13b029e9937c426834">这些功能可用于自动工件检测：<div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-1caf047352924ebdb40abd9b74381d06"><li><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_artifact_clip" target="_blank" rel="noopener noreferrer">ft_artifact_clip</a></b></li></ul><ul class="notion-list notion-list-disc notion-block-17f8246be75f49dc8d25d39053f11165"><li><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_artifact_ecg" target="_blank" rel="noopener noreferrer">ft_artifact_ecg</a></b></li></ul><ul class="notion-list notion-list-disc notion-block-7673b78034654514b3c915ae565d910b"><li><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_artifact_threshold" target="_blank" rel="noopener noreferrer">ft_artifact_threshold</a></b></li></ul><ul class="notion-list notion-list-disc notion-block-3f9ac0b10dbe4366b6e29a351c32f825"><li><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_artifact_eog" target="_blank" rel="noopener noreferrer">ft_artifact_eog</a></b></li></ul><ul class="notion-list notion-list-disc notion-block-185ce78b83914b709bd1a082654e1edd"><li><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_artifact_jump" target="_blank" rel="noopener noreferrer">ft_artifact_jump</a></b></li></ul><ul class="notion-list notion-list-disc notion-block-1e7a84a2200249b59070dfcdf28f6d40"><li><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_artifact_muscle" target="_blank" rel="noopener noreferrer">ft_artifact_muscle</a></b></li></ul><ul class="notion-list notion-list-disc notion-block-382bd109f88d4e19b4fc855120ec6ebe"><li><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_artifact_zvalue" target="_blank" rel="noopener noreferrer">ft_artifact_zvalue</a></b></li></ul><ul class="notion-list notion-list-disc notion-block-bf57814fbee64d0082f19c91e00b4121"><li><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_badchannel" target="_blank" rel="noopener noreferrer">ft_badchannel</a></b></li></ul><ul class="notion-list notion-list-disc notion-block-f376cbbb19e7419abbfb3a3350bd798e"><li><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_badsegment" target="_blank" rel="noopener noreferrer">ft_badsegment</a></b></li></ul></div></div><div class="notion-text notion-block-ffb53cac9b9e4fa3a631026616982f2e">检测 eog、jump 和 muscle artifacts 的函数都只是 <span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_artifact_zvalue" target="_blank" rel="noopener noreferrer">ft_artifact_zvalue </a></b></span>的包装器，其中 filter 和 padding 选项设置为合理的默认值。<span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_artifact_zvalue" target="_blank" rel="noopener noreferrer">ft_artifact_zvalue</a></b></span><span class="notion-orange_background"><b> 计算每个通道的预处理表示，通过减去通道平均值并除以其标准差将其转换为 z 值，然后对通道上的 z 值求和。</b></span>这适用于预期会出现在多个通道中的伪影，例如眨眼和肌肉活动。</div><div class="notion-text notion-block-ff7ae15c3370425490a790e938a4625d"><span class="notion-orange_background"><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_badchannel" target="_blank" rel="noopener noreferrer">ft_badchannel </a></span>和<span class="notion-orange_background"><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_badsegment" target="_blank" rel="noopener noreferrer"> ft_badsegment </a></span>函数使用<code class="notion-inline-code">cfg.method=&#x27;summary&#x27;</code>实现与<span class="notion-orange_background"><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectvisual" target="_blank" rel="noopener noreferrer">ft_rejectvisual</a></span><span class="notion-orange_background"> </span>函数相同的指标，并允许设置固定的先验阈值以排除通道或片段。</div><div class="notion-text notion-block-95062ea3c4894f37963eb2c701b42823">可以在<a class="notion-link" href="/c495b92e70774c3087b2f16ce6d48c6e">自动伪影拒绝</a>教程中找到更多信息。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-92d6c859d5c54255ac6469d054edde67" data-id="92d6c859d5c54255ac6469d054edde67"><span><div id="92d6c859d5c54255ac6469d054edde67" class="notion-header-anchor"></div><a class="notion-hash-link" href="#92d6c859d5c54255ac6469d054edde67" title="从数据中拒绝带有伪影的片段"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>从数据中拒绝带有伪影的片段</b></span></span></h4><div class="notion-text notion-block-89d161768ebe4a57a6d1b6869c988e24">如果您使用人工 / 视觉或自动检测伪影片段，您通常会继续使用 <span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectartifact" target="_blank" rel="noopener noreferrer">ft_rejectartifact</a></b></span><span class="notion-orange_background"><b> </b></span>拒绝这些片段进行后续分析。FieldTrip 支持可变的试验长度的数据，这允许您<span class="notion-red">仅拒绝那些包含伪影的数据，保留试验的其余部分。</span>如果您的实验包含很长的试次，这将特别有用。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-0283df87a8054415bcda6ad7ba2668dc" data-id="0283df87a8054415bcda6ad7ba2668dc"><span><div id="0283df87a8054415bcda6ad7ba2668dc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0283df87a8054415bcda6ad7ba2668dc" title="从数据中拒绝带有伪影的通道"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>从数据中拒绝带有伪影的通道</b></span></span></h4><div class="notion-text notion-block-2b4600cb6b10467bbe46ce1411d978ae">如果您已识别出不良通道，则可以通过在<code class="notion-inline-code">cfg.channel</code>选项中指定它们并将它们排除在后续处理之外。除了指定要保留的所有频道，您还可以像这样指定要删除的明确频道：</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-22e5d18ea2a84922943f563b822cded4" data-id="22e5d18ea2a84922943f563b822cded4"><span><div id="22e5d18ea2a84922943f563b822cded4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#22e5d18ea2a84922943f563b822cded4" title="从数据中减去伪影"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>从数据中减去伪影</b></span></span></h3><div class="notion-text notion-block-d352d41d02dd493d948d680293974c3d">在某些情况下，您可以假设伪影是感兴趣信号的线性添加，而不是排除带有伪影的片段。如果您能够识别伪影，则可以减去它，留下您感兴趣的 EEG 或 MEG 信号。这适用于某些类型的伪影，例如 EEG 中的高频噪声或 50 或 60 Hz 的线路噪声。这也可用于消除眼球运动对脑电图数据的影响，假设眨眼和运动对于正确执行任务不是问题。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-56618da18ab74e9b857dba0b255e7db2" data-id="56618da18ab74e9b857dba0b255e7db2"><span><div id="56618da18ab74e9b857dba0b255e7db2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#56618da18ab74e9b857dba0b255e7db2" title="使用滤波器去除伪影"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>使用滤波器去除伪影</b></span></span></h4><div class="notion-text notion-block-308a6ad5eb024e9f82b5a3e7aa6bf6d1">一些伪影以特定频带表示。例如，由于电极漂移，伪影可能会出现在低频，或者以您不期待的方式出现在您感兴趣的高频 EEG 活动，或者出现在非常特定的频率，例如 50 Hz 线路噪声。您可以在 <span class="notion-orange_background"><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_preprocessing" target="_blank" rel="noopener noreferrer">ft_preprocessing</a></span><span class="notion-orange_background"> </span>中使用滤波器来删除这些对数据的伪影贡献。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-e6f2d499e6114904ac528512c9134838" data-id="e6f2d499e6114904ac528512c9134838"><span><div id="e6f2d499e6114904ac528512c9134838" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e6f2d499e6114904ac528512c9134838" title="使用 ICA 识别和移除伪影"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>使用 ICA 识别和移除伪影</b></span></span></h4><div class="notion-text notion-block-a220943b9af04f28bec713713b3a3121">您可以<span class="notion-red"><b>使用独立成分分析 (ICA) 或主成分分析 (PCA) 对数据进行线性分解。</b></span>使用这些方法，您可以将一组空间滤波器应用于数据，之后数据不再以记录（头皮）通道的级别表示，而是作为一组虚拟通道或成分表示。<span class="notion-orange_background">在 ICA 分解的情况下，选择滤波器以产生成分的最大独立时间过程。在 PCA 的情况下，滤波器产生正交时间过程。</span>某些伪影，例如由眨眼引起的伪影，通常由一些相当容易识别的成分反映出来。然后可以从数据中删除这些视觉识别的组件，并且可以使用<b> </b><span class="notion-orange_background"><b><a class="notion-link" href="https://www.fieldtriptoolbox.org/reference/ft_rejectcomponent" target="_blank" rel="noopener noreferrer">ft_rejectcomponent</a></b></span><span class="notion-orange_background"><b> </b></span>将剩余的成分投影回通道级别。</div><div class="notion-text notion-block-10dcc874616249d8af628ecfaf6be0a2">以下示例脚本说明了<span class="notion-orange_background">如何使用 ICA 检测和移除</span><span class="notion-orange_background"><a class="notion-link" href="https://www.fieldtriptoolbox.org/example/ica_eog" target="_blank" rel="noopener noreferrer">EOG</a></span><span class="notion-orange_background">和</span><span class="notion-orange_background"><a class="notion-link" href="https://www.fieldtriptoolbox.org/example/ica_ecg" target="_blank" rel="noopener noreferrer">ECG</a></span><span class="notion-orange_background">伪影。</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-7dc0036ee51e4e889df017fef16869c8" data-id="7dc0036ee51e4e889df017fef16869c8"><span><div id="7dc0036ee51e4e889df017fef16869c8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7dc0036ee51e4e889df017fef16869c8" title="# 建议进一步阅读"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b># 建议进一步阅读</b></span></span></h3><div class="notion-text notion-block-f8f45bc36e534f458d0710a7c50fcc59">在这个关于处理 FieldTrip 中的伪影的简短介绍之后，您可以继续学习<a class="notion-link" href="/98aada100bef42a0888492de3db3a921">视觉伪影拒绝</a>和<a class="notion-link" href="/c495b92e70774c3087b2f16ce6d48c6e">自动伪影拒绝</a>教程。还可以在一些示例脚本和常见问题解答中找到有关处理工件的更多信息。</div><div class="notion-blank notion-block-e000b1c7e1b146f2b3b22fc6cd7274e4"> </div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>