docstr: Rotation towards target matrix example
  http://www.stat.ucla.edu/research/gpa
docstr_tok: ["Rotation","towards","target","matrix","example","http",":","\/\/www.stat.ucla.edu\/research\/gpa"]
code: def test_target_rotation(self):
      """
      Rotation towards target matrix example
      http://www.stat.ucla.edu/research/gpa
      """
      A = self.str2matrix(
          """
           .830 -.396
           .818 -.469
           .777 -.470
           .798 -.401
           .786  .500
           .672  .458
           .594  .444
           .647  .333
          """
      )
      H = self.str2matrix(
          """
            .8 -.3
            .8 -.4
            .7 -.4
            .9 -.4
            .8  .5
            .6  .4
            .5  .4
            .6  .3
          """
      )
      T = target_rotation(A, H)
      L = A.dot(T)
      L_required = self.str2matrix(
          """
          0.84168  -0.37053
          0.83191  -0.44386
          0.79096  -0.44611
          0.80985  -0.37650
          0.77040   0.52371
          0.65774   0.47826
          0.58020   0.46189
          0.63656   0.35255
          """
      )
      self.assertTrue(np.allclose(L, L_required, atol=1e-05))
      T = target_rotation(A, H, full_rank=True)
      L = A.dot(T)
      self.assertTrue(np.allclose(L, L_required, atol=1e-05))
  
imports: import unittest
  import numpy
  from statsmodels.multivariate.factor_rotation._wrappers import rotate_factors
  from statsmodels.multivariate.factor_rotation._gpa_rotation import ff_partial_target, vgQ_partial_target, ff_target, vgQ_target, CF_objective, orthomax_objective, oblimin_objective, GPA
  from statsmodels.multivariate.factor_rotation._analytic_rotation import target_rotation
label_desc: Use image node_id 2 for calling the TestAnalyticRotation obj's underlying member method code with example usage: obj.test_target_rotation() without return types