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","."]
docstr: Returns team 1's probability of winning
docstr_tok: ["Returns","team","1","'s","probability","of","winning"]
code: def predict_two_components(
      self, team_1, team_2, team_1b, team_2b, neutral=False
  ):
      """
      Returns team 1's probability of winning
      """
      if self.latent_variables.estimated is False:
          raise Exception("No latent variables estimated!")
      else:
          if type(team_1) == str:
              team_1_ability = np.trim_zeros(
                  self._model_abilities(
                      self.latent_variables.get_z_values()
                  )[0].T[self.team_dict[team_1]],
                  trim="b",
              )[-1]
              team_2_ability = np.trim_zeros(
                  self._model_abilities(
                      self.latent_variables.get_z_values()
                  )[0].T[self.team_dict[team_2]],
                  trim="b",
              )[-1]
              team_1_b_ability = np.trim_zeros(
                  self._model_abilities(
                      self.latent_variables.get_z_values()
                  )[1].T[self.team_dict[team_1]],
                  trim="b",
              )[-1]
              team_2_b_ability = np.trim_zeros(
                  self._model_abilities(
                      self.latent_variables.get_z_values()
                  )[1].T[self.team_dict[team_2]],
                  trim="b",
              )[-1]
  
          else:
              team_1_ability = np.trim_zeros(
                  self._model_abilities(
                      self.latent_variables.get_z_values()
                  )[0].T[team_1],
                  trim="b",
              )[-1]
              team_2_ability = np.trim_zeros(
                  self._model_abilities(
                      self.latent_variables.get_z_values()
                  )[0].T[team_2],
                  trim="b",
              )[-1]
              team_1_b_ability = np.trim_zeros(
                  self._model_abilities(
                      self.latent_variables.get_z_values()
                  )[1].T[team_1_b],
                  trim="b",
              )[-1]
              team_2_b_ability = np.trim_zeros(
                  self._model_abilities(
                      self.latent_variables.get_z_values()
                  )[1].T[team_2_b],
                  trim="b",
              )[-1]
  
      t_z = self.transform_z()
  
      if neutral is False:
          return self.link(
              t_z[0]
              + team_1_ability
              - team_2_ability
              + team_1_b_ability
              - team_2_b_ability
          )
      else:
          return self.link(
              team_1_ability
              - team_2_ability
              + team_1_b_ability
              - team_2_b_ability
          )
  
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 17 for calling the GASRank obj's underlying member method code with example usage: obj.predict_two_components(team_1, team_2, team_1b, team_2b, neutral) and returns: self, self