class_docstr: Distances combined via arithmetic operation, e.g., addition, multiplication.
  
  `CombinedDistance` creates a pairwise trafo from multiple other pairwise trafos,
  by performing an arithmetic operation (np.ufunc) on the multiple distance matrices.
  
  For a list of transformers `trafo1`, `trafo2`, ..., `trafoN`, ufunc `operation`,
  this compositor behaves as follows:
  `transform(X, X2)` - computes `dist1 = trafo1.transform(X, X2)`,
      `dist2 = trafo2.transform(X, X2)`, ..., distN =  trafoN.transform(X, X2)`,
      all of shape `(len(X), len(X2)`, then applies `operation` entry-wise,
      to obtain a single matrix `dist` of shape `(len(X), len(X2)`
      Example: if `operation = np.sum`, then `dist` is
      the entry-wise sum of `dist1`, `dist2`, ..., `distN`
  
  Parameters
  ----------
  pw_trafos : list of sktime pairwise panel distances, or
      list of tuples (str, transformer) of sktime pairwise panel distances
      distances combined to a single distance using the operation
  operation : None, str, function, or numpy ufunc, optional, default = None = mean
      if str, must be one of "mean", "+" (add), "*" (multiply), "max", "min"
      if func, must be of signature (1D iterable) -> float
      operation carried out on the distance matrices distances
  
  Examples
  --------
  >>> from sktime.dists_kernels.algebra import CombinedDistance
  >>> from sktime.dists_kernels.dtw import DtwDist
  >>> from sktime.datasets import load_unit_test
  >>>
  >>> X, _ = load_unit_test()
  >>> X = X[0:3]
  >>> sum_dist = CombinedDistance([DtwDist(), DtwDist(weighted=True)], "+")
  >>> dist_mat = sum_dist.transform(X)
  
  the same can also be done more compactly using dunders:
  
  >>> sum_dist = DtwDist() + DtwDist(weighted=True)
  >>> dist_mat = sum_dist(X)
class_docstr_tok: ["Distances","combined","via","arithmetic","operation",",","e.g.",",","addition",",","multiplication",".","`","CombinedDistance","`","creates","a","pairwise","trafo","from","multiple","other","pairwise","trafos",",","by","performing","an","arithmetic","operation","(","np.ufunc",")","on","the","multiple","distance","matrices",".","For","a","list","of","transformers","`","trafo1","`",",","`","trafo2","`",",","...",",","`","trafoN","`",",","ufunc","`","operation","`",",","this","compositor","behaves","as","follows",":","`","transform","(","X",",","X2",")","`","-","computes","`","dist1","=","trafo1.transform","(","X",",","X2",")","`",",","`","dist2","=","trafo2.transform","(","X",",","X2",")","`",",","...",",","distN","=","trafoN.transform","(","X",",","X2",")","`",",","all","of","shape","`","(","len","(","X",")",",","len","(","X2",")","`",",","then","applies","`","operation","`","entry-wise",",","to","obtain","a","single","matrix","`","dist","`","of","shape","`","(","len","(","X",")",",","len","(","X2",")","`","Example",":","if","`","operation","=","np.sum","`",",","then","`","dist","`","is","the","entry-wise","sum","of","`","dist1","`",",","`","dist2","`",",","...",",","`","distN","`","Parameters","--","--","--","--","--","pw_trafos",":","list","of","sktime","pairwise","panel","distances",",","or","list","of","tuples","(","str",",","transformer",")","of","sktime","pairwise","panel","distances","distances","combined","to","a","single","distance","using","the","operation","operation",":","None",",","str",",","function",",","or","numpy","ufunc",",","optional",",","default","=","None","=","mean","if","str",",","must","be","one","of","``","mean","''",",","``","+","''","(","add",")",",","``","*","''","(","multiply",")",",","``","max","''",",","``","min","''","if","func",",","must","be","of","signature","(","1D","iterable",")","-",">","float","operation","carried","out","on","the","distance","matrices","distances","Examples","--","--","--","--",">",">",">","from","sktime.dists_kernels.algebra","import","CombinedDistance",">",">",">","from","sktime.dists_kernels.dtw","import","DtwDist",">",">",">","from","sktime.datasets","import","load_unit_test",">",">",">",">",">",">","X",",","_","=","load_unit_test","(",")",">",">",">","X","=","X","[","0:3","]",">",">",">","sum_dist","=","CombinedDistance","(","[","DtwDist","(",")",",","DtwDist","(","weighted=True",")","]",",","``","+","''",")",">",">",">","dist_mat","=","sum_dist.transform","(","X",")","the","same","can","also","be","done","more","compactly","using","dunders",":",">",">",">","sum_dist","=","DtwDist","(",")","+","DtwDist","(","weighted=True",")",">",">",">","dist_mat","=","sum_dist","(","X",")"]
code: def _pw_trafos(self, value):
      self.pw_trafos = value
  
file_path: sktime/sktime/dists_kernels/algebra.py
imports: import numpy
  from sktime.base import _HeterogenousMetaEstimator
  from sktime.dists_kernels.base import BasePairwiseTransformerPanel
label_desc: Use image node_id 4 for calling the CombinedDistance obj's underlying member method code with example usage: obj._pw_trafos(value) without return types