skdim.id.KNN.fit_pw¶
-
KNN.fit_pw(X, precomputed_knn=None, smooth=False, n_neighbors=100, n_jobs=1)¶ Creates an array of pointwise ID estimates (self.dimension_pw_) by fitting the estimator in kNN of each point.
Parameters: - X : np.array (n_samples x n_neighbors)
Dataset to fit
- precomputed_knn : np.array (n_samples x n_dims)
An array of precomputed (sorted) nearest neighbor indices
- n_neighbors
Number of nearest neighbors to use (ignored when using precomputed_knn)
- n_jobs : int
Number of processes
- smooth : bool, default = False
- Additionally computes a smoothed version of pointwise estimates by
taking the ID of a point as the average ID of each point in its neighborhood (self.dimension_pw_)
Returns: self (object) – Returns self