532150f6a70f1eca17a871b30a64a5aac97eff38,umap/umap_.py,UMAP,_validate_parameters,#UMAP#,1427

Before Change


        elif self.metric in dist.named_distances:
            self._input_distance_func = dist.named_distances[self.metric]
        elif self.metric == "precomputed":
            warn("Using precomputed metric; transform will be unavailable for new data")
        else:
            raise ValueError("metric is neither callable, " + "nor a recognised string")

        if callable(self.output_metric):

After Change


                     "a tuple of (distance [float], gradient [np.array])")
        elif self.metric in dist.named_distances:
            self._input_distance_func = dist.named_distances[self.metric]
            try:
                self._inverse_distance_func = dist.named_distances_with_gradients[self.metric]
            except KeyError:
                warn("gradient function is not yet implemented for {} distance metric; "
                     "inverse_transform will be unavailable".format(self.metric))
                self._inverse_distance_func = None
        elif self.metric == "precomputed":
            warn("using precomputed metric; transform will be unavailable for new data and inverse_transform "
                 "will be unavailable for all data")
            self._inverse_distance_func = None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: lmcinnes/umap
Commit Name: 532150f6a70f1eca17a871b30a64a5aac97eff38
Time: 2020-03-01
Author: paxton.c.fitzpatrick.19@dartmouth.edu
File Name: umap/umap_.py
Class Name: UMAP
Method Name: _validate_parameters


Project Name: uber/pyro
Commit Name: 4a040001aa00955b4cfb90469590bffb0b5791f8
Time: 2020-04-16
Author: fritzo@uber.com
File Name: pyro/util.py
Class Name:
Method Name: warn_if_nan


Project Name: uber/pyro
Commit Name: 4a040001aa00955b4cfb90469590bffb0b5791f8
Time: 2020-04-16
Author: fritzo@uber.com
File Name: pyro/util.py
Class Name:
Method Name: warn_if_inf