def deco(f): return explain_prediction.register(cls)( explain_prediction_sklearn.register(cls)(f))
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)