docstr: Caculate confidence interval of losses.
  
  Args:
      data: A list of losses.
      confidence: Confidence level.
  
  Returns:
      Mean and margin of error.
docstr_tok: ["Caculate","confidence","interval","of","losses",".","Args",":","data",":","A","list","of","losses",".","confidence",":","Confidence","level",".","Returns",":","Mean","and","margin","of","error","."]
code: def _confidence_interval(data, confidence=0.95):
      """
      Caculate confidence interval of losses.
  
      Args:
          data: A list of losses.
          confidence: Confidence level.
  
      Returns:
          Mean and margin of error.
      """
  
      a = 1.0 * np.array(data)
      n = len(a)
      m, se = np.mean(a), scipy.stats.sem(a)
      h = se * scipy.stats.t.ppf((1 + confidence) / 2.0, n - 1)
  
      return m, h
  
file_path: PARL/benchmark/torch/maml++/maml_agent.py
imports: import numpy
  import scipy
  import parl
  import tqdm
label_desc: Use image node_id 4 for calling the MAMLAgent obj's underlying member method code with example usage: obj._confidence_interval(data, confidence) and returns: m,  h