class_docstr: Distance function obtained from a kernel function.
  
  Formal details (for real valued objects, mixed typed rows in analogy):
  Let :math:`k: \mathbb{R}^D \times \mathbb{R}^D\rightarrow \mathbb{R}`
  be the pairwise function in `kernel`, when applied to `D`-vectors.
  `DistFromKernel(dist)` corresponds to the distance function
  :math:`d(x, y) := \sqrt{k(x, x) + k(y, y) - 2 \cdot k(x, y)}`.
  
  It should be noted that if :math:`k` is positive semi-definite,
  then :math:`d` will be a metric and satisfy the triangle inequality.
  
  Parameters
  ----------
  kernel : pairwise transformer of BasePairwiseTransformer scitype, or
      callable np.ndarray (n_samples, nd) x (n_samples, nd) -> (n_samples x n_samples)
class_docstr_tok: ["Distance","function","obtained","from","a","kernel","function",".","Formal","details","(","for","real","valued","objects",",","mixed","typed","rows","in","analogy",")",":","Let",":","math",":","`","k",":","\\mathbb","{","R","}","^D","\\times","\\mathbb","{","R","}","^D\\rightarrow","\\mathbb","{","R","}","`","be","the","pairwise","function","in","`","kernel","`",",","when","applied","to","`","D","`","-vectors",".","`","DistFromKernel","(","dist",")","`","corresponds","to","the","distance","function",":","math",":","`","d","(","x",",","y",")",":","=","\\sqrt","{","k","(","x",",","x",")","+","k","(","y",",","y",")","-","2","\\cdot","k","(","x",",","y",")","}","`",".","It","should","be","noted","that","if",":","math",":","`","k","`","is","positive","semi-definite",",","then",":","math",":","`","d","`","will","be","a","metric","and","satisfy","the","triangle","inequality",".","Parameters","--","--","--","--","--","kernel",":","pairwise","transformer","of","BasePairwiseTransformer","scitype",",","or","callable","np.ndarray","(","n_samples",",","nd",")","x","(","n_samples",",","nd",")","-",">","(","n_samples","x","n_samples",")"]
code: def __init__(self, kernel):
      self.kernel = kernel
  
      super().__init__()
  
      # set property tags based on tags of components
      tags_to_clone = [
          "capability:missing_values",
          "capability:multivariate",
          "capability:unequal_length",
      ]
  
      if isinstance(kernel, BasePairwiseTransformerPanel):
          self.clone_tags(kernel, tags_to_clone)
  
file_path: sktime/sktime/dists_kernels/dist_to_kern.py
imports: import numpy
  from sktime.dists_kernels.base import BasePairwiseTransformerPanel
label_desc: Use image node_id 1 to create a new DistFromKernel object from inherited base classes: BasePairwiseTransformerPanel with example: obj = DistFromKernel(kernel)