'Fit the Kernel Density model on the data.
Parameters
X : array_like, shape (n_samples, n_features)
List of n_features-dimensional data points.  Each row
corresponds to a single data point.'

def fit(self, X, y=None):

    algorithm = self._choose_algorithm(self.algorithm, self.metric)
    X = check_array(X, order='C', dtype=DTYPE)
    kwargs = self.metric_params
    if (kwargs is None):
        kwargs = {}
    self.tree_ = TREE_DICT[algorithm](X, metric=self.metric, leaf_size=self.leaf_size, **kwargs)
    return self
