probnum
probnum copied to clipboard
Refactor the design of the probabilistic linear solver functions and classes
-
[x] Cleanly separate
_preprocess_linear_system
from_init_solver
~and make sure only one takes the assumptions on A, i.e.assume_A
as an argument.~ -
[ ] Create a common (abstract) class
MatrixBasedSolver(ProbabilisticLinearSolver)
with generic functions:-
policy
-
observe
-
step_size
/line_search
-
infer_posteriors
-
optim_hyperparams
-
solve
- ... This way we can avoid some code duplication between the different versions of the matrix-based solvers.
-
In the initial pylint PR #150 I found many pylint messages that mostly relate to linalg
, and especially matrixbased
. I'll post a full list in here since it seems to relate to this PR. If you think that those are better tackled through individual tasks I could also open individual issues:
-
too-many-arguments
-
abstract-method
-
too-many-branches
-
arguments-differ
-
redefined-builtin
-
too-many-lines
-
abstract-class-instantiated
-
too-complex
-
too-many-instance-attributes
-
too-many-statements
-
attribute-defined-outside-init
These are not all the errors that pylint raises, neither are those errors that only appear in linalg
, but I think that most of these should be considered when working on this refactoring, and ideally I would hope for pylint src/probnum/linalg/
to pass with these messages enabled (e.g. through the --enable=<message>
argument).
Relating to my previous comment: I just opened #158 to track the work on the pylint exceptions for the linalg
module.