class_docstr: Test ResidualPlot visualizer
class_docstr_tok: ["Test","ResidualPlot","visualizer"]
docstr: Test that the user can supply an alpha param on instantiation
docstr_tok: ["Test","that","the","user","can","supply","an","alpha","param","on","instantiation"]
code: def test_alpha_param(self, mock_sca):
      """
      Test that the user can supply an alpha param on instantiation
      """
      # Instantiate a prediction error plot, provide custom alpha
      visualizer = ResidualsPlot(
          Ridge(random_state=8893),
          train_alpha=0.3,
          test_alpha=0.75,
          hist=False,
      )
      alphas = {"train_point": 0.3, "test_point": 0.75}
      # Test param gets set correctly
      assert visualizer.alphas == alphas
  
      visualizer.ax = mock.MagicMock()
      visualizer.fit(self.data.X.train, self.data.y.train)
      visualizer.score(self.data.X.test, self.data.y.test)
  
      # Test that alpha was passed to internal matplotlib scatterplot
      _, scatter_kwargs = visualizer.ax.scatter.call_args
      assert "alpha" in scatter_kwargs
      assert scatter_kwargs["alpha"] == 0.75
  
imports: import sys
  import pytest
  import matplotlib
  import matplotlib.pyplot
  from yellowbrick.datasets import load_energy
  from yellowbrick.exceptions import YellowbrickValueError
  from yellowbrick.regressor.residuals import ResidualsPlot, residuals_plot
  from unittest import mock
  from tests.fixtures import Dataset, Split
  from tests.base import IS_WINDOWS_OR_CONDA, VisualTestCase
  from sklearn.datasets import make_regression
  from sklearn.linear_model import Ridge, Lasso
  from sklearn.neural_network import MLPRegressor
  from sklearn.linear_model import LinearRegression
  from sklearn.model_selection import train_test_split
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import MinMaxScaler
label_desc: Use image node_id 13 for calling the TestResidualsPlot obj's underlying member method code with example usage: obj.test_alpha_param(mock_sca) without return types