docstr: Takes the maximum score of a set of detectors in an ensemble.
  
  Parameters
  ----------
  scores
      `Torch.Tensor` of scores from ensemble of detectors.
  
  Returns
  -------
  `Torch.Tensor` of maximum scores.
docstr_tok: ["Takes","the","maximum","score","of","a","set","of","detectors","in","an","ensemble",".","Parameters","--","--","--","--","--","scores","`","Torch.Tensor","`","of","scores","from","ensemble","of","detectors",".","Returns","--","--","--","-","`","Torch.Tensor","`","of","maximum","scores","."]
code: def transform(self, scores: torch.Tensor) -> torch.Tensor:
      """Takes the maximum score of a set of detectors in an ensemble.
  
      Parameters
      ----------
      scores
          `Torch.Tensor` of scores from ensemble of detectors.
  
      Returns
      -------
      `Torch.Tensor` of maximum scores.
      """
      vals, _ = torch.max(scores, dim=-1)
      return vals
  
imports: from abc import ABC, abstractmethod
  from typing import Optional
  from typing_extensions import Self
  import torch
  import numpy
  from torch.nn import Module
  from alibi_detect.exceptions import NotFittedError
label_desc: Use image node_id 2 for calling the MaxAggregator obj's underlying member method code with example usage: obj.transform(scores) and returns: vals