Skip to content

[Question] Clarification needed on two details in the numpy source code #188

@nihaoxiaoli

Description

@nihaoxiaoli

Hello, I'm looking at the numpy implementation and have two questions about potential issues or design choices.

1. Use of 'n_pc' vs. 'pcnum'

  • Location: GLMsingle/glmsingle/glmsingle.py, Line 1552
  • Question: In this line, the code uses 'n_pc'. However, the optimal number of PCs found via cross-validation seems to be stored in the 'pcnum' variable. Is there a reason for using 'n_pc' here instead of the cross-validated 'pcnum'?

2. results variable being re-copied in session loop

  • Location: GLMsingle/glmsingle/ssq/calcbadness.py, Line 83
  • Question: Inside the loop that iterates through sessions, results is copied to resultsdm at the start of every iteration. It seems this would cause the modifications made to resultsdm in one iteration to be lost in the next, meaning the final resultsdm would only reflect changes from the very last session. Is this the intended behavior?

I'm flagging these because I'm not sure if they are bugs or if I'm missing something in my understanding of the code. Any insights would be helpful. Thanks

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions