Skip to content

Enforce single-target regression #6

@berkgercek

Description

@berkgercek

Honestly this is a bit of a weird one resulting from very inconsistent design in scikit-learn's user interface. Some modules, like many of the linear regression (and regularized variants thereof) allow for multi-target fitting. This means that the y array can be of shape (N_samples, N_targets).

However not all of them support this, and notably the PoissonRegressor class does not. Add to the mix that none of the NVIDIA RAPIDS cuML package regressors, which have GPU acceleration of many common models, support multi-target regression, and it's a huge headache.

Currently the LinearGLM class assumes multi-target support, while the PoissonGLM object outright forces use of the scikit-learn poisson object.

Goals here:

  1. Completely offload the generation of a sklearn-like fitting object to the user. No more PoissonGLM use of a internally-generated regression object.
  2. Develop strict internal checks to make sure that the base methods of an sklearn regressor are implemented by the passed fitting object. .fit(), .coef_, .intercept_ are necessities, and it would be nice to have .predict() if point 3 is going to be implemented, as the link function will be unknown and is necessary for issue Synthetic data generation #2 to be correctly resolved.
  3. Maybe consolidate the LinearGLM and PoissonGLM classes into a single class, possibly called SpikeGLM or something similar. This would simplify the interface, and also make it easier to delineate down the line whether to use that or possibly a imaging-specific class that does a different set of preprocessing on the data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions