Update of SA-xTRCA algorithm#89
Open
JIeLu-Wu wants to merge 4 commits into
Open
Conversation
I added the SA-xTRCA class in cca.py and implemented a demo for phase alignment and classification using SA-xTRCA. In addition, I provided a portion of the experimental data (from 10 subjects) used in my research, which is included in the SA-xTRCA_demo folder. All data files are in .mat format.
Modified some comments
ch-MEIJIE
requested changes
Mar 31, 2025
Collaborator
There was a problem hiding this comment.
如果需要提交数据集,需要创建一个数据集类,请参考metabci/brainda/datasets下的数据集构建方式,继承BaseDataset构建一个数据集。数据集原始数据可以上传到zendo平台https://zenodo.org/。
请麻烦修改,感谢!
| self.T_min = 1 | ||
| self.t_i = [] | ||
|
|
||
| def trca_kernel(self, X: ndarray): |
Collaborator
There was a problem hiding this comment.
该文件存在一个_trac_kernel函数,请考虑服用。观察到还需要对特征值进行一定操作,如果无法复用,请修改类函数名。
| labels = self.classes_[np.argmax(feat, axis=-1)] | ||
| return labels | ||
|
|
||
| def trca_train(self, X: ndarray, y: ndarray): |
Collaborator
There was a problem hiding this comment.
这个函数和trca_kernel是否存在重复?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added the SA-xTRCA class in cca.py and implemented a demo for phase alignment and classification using SA-xTRCA. In addition, I provided a portion of the experimental data (from 10 subjects) used in my research, which is included in the SA-xTRCA_demo folder. All data files are in .mat format.