code: def test_pca_score2(setup):
      # Test that probabilistic PCA correctly separated different datasets
      n, p = 100, 3
      rng = np.random.RandomState(0)
      X = mt.tensor(rng.randn(n, p) * 0.1) + mt.array([3, 4, 5])
      for solver in solver_list:
          pca = PCA(n_components=2, svd_solver=solver)
          pca.fit(X)
          ll1 = pca.score(X)
          ll2 = pca.score(
              mt.tensor(rng.randn(n, p) * 0.2) + mt.array([3, 4, 5])
          )
          assert ll1.fetch() > ll2.fetch()
  
          # Test that it gives different scores if whiten=True
          pca = PCA(n_components=2, whiten=True, svd_solver=solver)
          pca.fit(X)
          ll2 = pca.score(X)
          assert ll1.fetch() > ll2.fetch()
  
imports: from itertools import product
  import numpy
  import pytest
  import scipy
  from sklearn import datasets
  from sklearn.utils._testing import assert_array_almost_equal, assert_almost_equal, assert_raises_regex, assert_raise_message, assert_raises
  from ....None import tensor
  from .._pca import PCA, _assess_dimension, _infer_dimension
label_desc: Use image node_id 20 for calling a global function with example usage: test_pca_score2(setup) without return types