class_docstr: Test the ProjectionVisualizer base class
class_docstr_tok: ["Test","the","ProjectionVisualizer","base","class"]
docstr: Ensure that the alpha parameter modifies opacity
docstr_tok: ["Ensure","that","the","alpha","parameter","modifies","opacity"]
code: def test_alpha_param(self):
      """
      Ensure that the alpha parameter modifies opacity
      """
      # Instantiate a prediction error plot, provide custom alpha
      X, y = self.discrete
      params = {"alpha": 0.3, "projection": 2}
      visualizer = MockVisualizer(**params)
      visualizer.ax = mock.MagicMock()
      visualizer.fit(X, y)
      visualizer.transform(X, y)
  
      assert visualizer.alpha == 0.3
  
      # 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.3
  
imports: import pytest
  import numpy.testing
  import matplotlib.pyplot
  from yellowbrick.features.projection import *
  from yellowbrick.exceptions import YellowbrickValueError
  from tests.base import VisualTestCase
  from unittest import mock
  from sklearn.decomposition import PCA
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
label_desc: Use image node_id 7 for calling the TestProjectionVisualizer obj's underlying member method code with example usage: obj.test_alpha_param() without return types