pybids
pybids copied to clipboard
statsmodel: separate validation within `modeling`
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.