Exemple #1
0
    classification.SAGClassifier,
    classification.SDCAClassifier,
    classification.SGDClassifier,
    # classification.SVRGClassifier,   # tests fail for it
]

_REGRESSORS = [
    regression.AdaGradRegressor,
    regression.CDRegressor,
    regression.FistaRegressor,
    regression.LinearSVR,
    regression.SAGARegressor,
    regression.SAGRegressor,
    regression.SDCARegressor,
    regression.SGDRegressor,
    # regression.SVRGRegressor
]

for clf in _CLASSIFIERS:
    explain_weights.register(clf, explain_linear_classifier_weights)
    explain_weights_lightning.register(clf, explain_linear_classifier_weights)
    explain_prediction.register(clf, explain_prediction_linear_classifier)
    explain_prediction_lightning.register(clf, explain_prediction_linear_classifier)


for reg in _REGRESSORS:
    explain_weights.register(reg, explain_linear_regressor_weights)
    explain_weights_lightning.register(reg, explain_linear_regressor_weights)
    explain_prediction.register(reg, explain_prediction_linear_regressor)
    explain_prediction_lightning.register(reg, explain_prediction_linear_regressor)
 def deco(f):
     return explain_weights.register(cls)(
         explain_weights_sklearn.register(cls)(f))