-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Is your feature request related to a problem? Please describe.
Soon a new validator class will handle all BaseRegressor validations. This consists of validating inputs (X, y), params, and validating inputs and params compatibility. The current implementation has a very flexible protocol for validating parameters but less so for inputs.
One could think of making every validation as generalization, implementing similar protocols, and using mixin inheritance to compose the final validator. Using mixin may make the various compoments re-usable
Describe the solution you'd like
# in nemos/validation.py
class RegressorValidator():
"""Base validations"""
...
class ParamsValidator():
"""Base params validator"""
...
class InputValidator():
"""Base input"""
...
# in nemos/model/validaiton.py
class ModelParamsValidator(ParamsValidator):
"""Model specific params validator"""
...
class ModelInputValidator(InputValidator):
"""Model specific params validator"""
...
class ModelValidator(RegressorValidator, ModelParamsValidator, ModelInputValidator):
"""Full validator class."""Describe alternatives you've considered
Single class solutions. But that makes it a bit less re-usable.
Additional context
Add any other context or screenshots about the feature request here.