class_docstr: Test the PCA visualizer
class_docstr_tok: ["Test","the","PCA","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
      params = {"alpha": 0.3, "projection": 2, "random_state": 9932}
      visualizer = PCA(**params).fit(self.discrete.X)
      pca_array = visualizer.transform(self.discrete.X)
      assert visualizer.alpha == 0.3
  
      visualizer.ax = mock.MagicMock()
      visualizer.fit(self.discrete.X)
      visualizer.transform(self.discrete.X)
  
      # 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
      assert pca_array.shape == (self.discrete.X.shape[0], 2)
  
imports: import sys
  import pytest
  import numpy
  import numpy.testing
  from unittest import mock
  from tests.base import VisualTestCase, IS_WINDOWS_OR_CONDA
  from yellowbrick.features.pca import *
  from yellowbrick.exceptions import YellowbrickError, NotFitted
label_desc: Use image node_id 16 for calling the TestPCA obj's underlying member method code with example usage: obj.test_alpha_param(mock_sca) without return types