pybids icon indicating copy to clipboard operation
pybids copied to clipboard

statsmodel: separate validation within `modeling`

Open adelavega opened this issue 2 years ago • 0 comments

in my recent PR, i ran into the issue that there was many spots where an invalid model would lead to an ugly crash.

i started adding logic to catch these errors, but realized that its mixing up implementation logic with validation logic.

i propose that we remove all validation logic from bids.modeling, and instead run the statsmodel validator and/or add a validation layer/plugin that separates this logic. i suppose the one issue that some of these errors require the design matrices to be built up in order to fully validate.

but at least in the case of @Shotgunosine's recent PR (checking for intercept only model) there are many issue that could be caught on the frontend and keep the main code cleaner.

adelavega avatar May 23 '22 17:05 adelavega