class_docstr: Inherits time series methods from TSM class.
  
  **** GENERALIZED AUTOREGRESSIVE SCORE (GAS) RANK MODELS ****
  
  Parameters
  ----------
  data : pd.DataFrame
      Field to specify the univariate time series data that will be used.
  
  team_1 : str (pd.DataFrame)        
      Specifies which column contains the home team
  
  team_2 : str (pd.DataFrame)        
      Specifies which column contains the away team
  
  family : GAS family object
      Which distribution to use, e.g. GASNormal()
  
  score_diff : str (pd.DataFrame)        
      Specifies which column contains the score
  
  gradient_only : Boolean (default: True)
      If true, will only use gradient rather than second-order terms
      to construct the modified score.
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","class",".","*","*","*","*","GENERALIZED","AUTOREGRESSIVE","SCORE","(","GAS",")","RANK","MODELS","*","*","*","*","Parameters","--","--","--","--","--","data",":","pd.DataFrame","Field","to","specify","the","univariate","time","series","data","that","will","be","used",".","team_1",":","str","(","pd.DataFrame",")","Specifies","which","column","contains","the","home","team","team_2",":","str","(","pd.DataFrame",")","Specifies","which","column","contains","the","away","team","family",":","GAS","family","object","Which","distribution","to","use",",","e.g",".","GASNormal","(",")","score_diff",":","str","(","pd.DataFrame",")","Specifies","which","column","contains","the","score","gradient_only",":","Boolean","(","default",":","True",")","If","true",",","will","only","use","gradient","rather","than","second-order","terms","to","construct","the","modified","score","."]
code: def add_second_component(self, team_1, team_2):
      self.home_2_id, self.away_2_id = self._create_ids(
          self.original_dataframe[team_1].values,
          self.original_dataframe[team_2].values,
      )
      self.team_strings_2 = sorted(
          list(
              set(
                  np.append(
                      self.original_dataframe[team_1].values,
                      self.original_dataframe[team_2].values,
                  )
              )
          )
      )
      self.team_dict_2 = dict(
          zip(self.team_strings_2, range(len(self.team_strings_2)))
      )
      self.home_2_count, self.away_2_count = self._match_count_2()
      self.max_team_2 = max(
          np.max(self.home_2_id), np.max(self.away_2_id)
      )
  
      self.z_no += 1
      self.latent_variables.z_list = []
  
      self.latent_variables.add_z(
          "Constant",
          fam.Normal(0, 10, transform=None),
          fam.Normal(0, 3),
      )
      self.latent_variables.add_z(
          "Ability Scale 1",
          fam.Normal(0, 1, transform=None),
          fam.Normal(0, 3),
      )
      self.latent_variables.add_z(
          "Ability Scale 2",
          fam.Normal(0, 1, transform=None),
          fam.Normal(0, 3),
      )
  
      for no, i in enumerate(self.family.build_latent_variables()):
          self.latent_variables.add_z(i[0], i[1], i[2])
          self.latent_variables.z_list[3 + no].start = i[3]
      self.latent_variables.z_list[0].start = self.mean_transform(
          np.mean(self.data)
      )
  
      self._model = self._model_two_components
      self._model_abilities = self._model_abilities_two_components
      self.plot_abilities = self.plot_abilities_two_components
      self.predict = self.predict_two_components
  
imports: import sys
  import numpy
  import pandas
  import scipy.stats
  import scipy.special
  from ..None import families
  from ..None import tsm
  from ..None import data_check
  from .scores import *
  from .gas_core_recursions import gas_recursion
label_desc: Use image node_id 12 for calling the GASRank obj's underlying member method code with example usage: obj.add_second_component(team_1, team_2) without return types