metricstr or callable, default=’minkowski’ The distance metric to use for the tree. The default metric isminkowski, and with p=2 is equivalent to the standard Euclideanmetric. See the documentation of DistanceMetric for alist of available metrics.If metric is “precomputed”, X is assumed to be a distance matrix andmust be square during fit. X may be a sparse graph,in which case only “nonzero” elements may be considered neighbors.