Skip to content

EEGLAB error in function runica() at line 284 #917

@sachiiiliu0526-oss

Description

@sachiiiliu0526-oss

Description

Image

Subject: runica() error: pca value should be the number of principal components to retain

Problem Description:
I encountered a persistent error while running the ICA (Independent Component Analysis) using the runica() function in EEGLAB. Despite following the standard preprocessing pipeline, the process stops at line 284 with the following message:

runica(): pca value should be the number of principal components to retain.

Dataset Information:
Based on my dataset properties:

  • Filename: 2.set
  • Channels: 60 channels per frame
  • Reference: TP9 and TP10 were used as references
  • Epochs: 98 epochs, each 1500 frames long
  • Sampling Rate: 500 Hz
  • Current Status: ICA weights are currently "No" (calculation failed)

Steps to Reproduce:

  1. Load the preprocessed dataset (rereferenced to TP9/TP10).
  2. Navigate to Tools > Run ICA.
  3. Select runica as the algorithm.
  4. The error occurs during the initialization of the PCA dimension reduction step.

Contextual Note:
I suspect the issue is related to rank deficiency caused by the re-referencing process (referencing to TP9 and TP10). Since the data rank has likely decreased, the default PCA setting might be trying to extract more components than the available degrees of freedom in the data.

Environment:

  • Toolbox: EEGLAB
  • Function: runica()

💡 Zowie 的小贴士:

在 GitHub 提交之后,通常会有开发者建议你尝试手动指定 PCA 值为 58(即 $60 - 2$)来匹配数据的秩。

需要我帮你检查一下你运行 ICA 时输入的具体参数指令(Matlab Code)吗?这样我们可以更确切地定位是代码写错了还是 GUI 设置的问题。
[Description of the bug or feature
Attach a link to Dropbox or Google Drive with screenshots and your data if possible.
]


#### Steps to Reproduce
  1. [First Step]
  2. [Second Step]
  3. [and so on...]

#### Expected behavior: [*What you expected to happen*]
#### Actual behavior: [*What actually happened*]
#### Versions
OS version [fill in]
Matlab version [fill in]
EEGLAB version [fill in]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions