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_orthogonal_partial_target(self):
      """
      Rotation towards target matrix example
      http://www.stat.ucla.edu/research/gpa
      """
      A = self.get_A()
      H = self.str2matrix(
          """
            .8 -.3
            .8 -.4
            .7 -.4
            .9 -.4
            .8  .5
            .6  .4
            .5  .4
            .6  .3
          """
      )
      W = self.str2matrix(
          """
          1 0
          0 1
          0 0
          1 1
          1 0
          1 0
          0 1
          1 0
          """
      )
      vgQ = lambda L=None, A=None, T=None: vgQ_partial_target(
          H, W, L=L, A=A, T=T
      )
      L, phi, T, table = GPA(A, vgQ=vgQ, rotation_method="orthogonal")
      table_required = self.str2matrix(
          """
           0.00000    0.02559   -0.84194    1.00000
           1.00000    0.02203   -1.27116    0.25000
           2.00000    0.02154   -1.71198    0.25000
           3.00000    0.02148   -2.15713    0.25000
           4.00000    0.02147   -2.60385    0.25000
           5.00000    0.02147   -3.05114    0.25000
           6.00000    0.02147   -3.49863    0.25000
           7.00000    0.02147   -3.94619    0.25000
           8.00000    0.02147   -4.39377    0.25000
           9.00000    0.02147   -4.84137    0.25000
          10.00000    0.02147   -5.28897    0.25000
          """
      )
      L_required = self.str2matrix(
          """
          0.84526  -0.36228
          0.83621  -0.43571
          0.79528  -0.43836
          0.81349  -0.36857
          0.76525   0.53122
          0.65303   0.48467
          0.57565   0.46754
          0.63308   0.35876
          """
      )
      self.assertTrue(np.allclose(table, table_required, atol=1e-05))
      self.assertTrue(np.allclose(L, L_required, atol=1e-05))
      ff = lambda L=None, A=None, T=None: ff_partial_target(
          H, W, L=L, A=A, T=T
      )
      L2, phi, T2, table = GPA(A, ff=ff, rotation_method="orthogonal")
      self.assertTrue(np.allclose(L, L2, atol=1e-05))
      self.assertTrue(np.allclose(T, T2, 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 10 for calling the TestGPARotation obj's underlying member method code with example usage: obj.test_orthogonal_partial_target() without return types