Hello,
The
PredictionError plot requires data in order to plot the residuals against the predicted value; simply passing in the regressor is not sufficient to draw the plot.
To pass data into the plot, you'll have to call `fit()` and `score()` on the model. However, you obviously don't want to fit the model again (since it probably takes a while to train a DLN). To prevent refitting you can use the `is_fitted` argument as follows:
visualizer = PredictionError(mlp, is_fitted=True)
visualizer.fit(X_train, y_train)
visualizer.score(X_test, y_test)
visualizer.show()
Please note that Yellowbrick was developed for scikit-learn integration specifically. If the scikeras KerasRegressor works - that's great! However, we don't spend a lot of time testing external third-party models. If it doesn't work and you're interested in using Keras with Yellowbrick, we'd appreciate any pull requests into our
contrib package to support it!
Best Regards,
Benjamin Bengfort