parameters: (fpath)
return_statement: return click_model
docstring: Load a ClickModel child type from a JSON file.
  
      Parameters
      ----------
      fpath : str
          Path to the click model file.
  
      Returns
      -------
      PositionBiasedModel, UserBrowsingModel, CascadeModel
          The loaded click model instance.
docstring_summary: Load a ClickModel child type from a JSON file.
docstring_tokens: Load a ClickModel child type from a JSON file .
function: def loadModelFromJson(fpath):
      """Load a ClickModel child type from a JSON file.
  
      Parameters
      ----------
      fpath : str
          Path to the click model file.
  
      Returns
      -------
      PositionBiasedModel, UserBrowsingModel, CascadeModel
          The loaded click model instance.
      """
      with open(fpath, 'r') as f:
          model_desc = json.load(f)
  
      if model_desc['model_name'] == 'user_browsing_model':
          click_model = UserBrowsingModel()
      elif model_desc['model_name'] == 'cascade_model':
          click_model = CascadeModel()
      else:
          click_model = PositionBiasedModel()
  
      click_model.eta = model_desc['eta']
      click_model.click_prob = model_desc['click_prob']
      click_model.exam_prob = model_desc['exam_prob']
  
      return click_model
function_tokens: def loadModelFromJson ( fpath ) : with open ( fpath , 'r' ) as f : model_desc = json . load ( f ) if model_desc [ 'model_name' ] == 'user_browsing_model' : click_model = UserBrowsingModel ( ) elif model_desc [ 'model_name' ] == 'cascade_model' : click_model = CascadeModel ( ) else : click_model = PositionBiasedModel ( ) click_model . eta = model_desc [ 'eta' ] click_model . click_prob = model_desc [ 'click_prob' ] click_model . exam_prob = model_desc [ 'exam_prob' ] return click_model