skdim.id.KNN.fit_transform_pw¶
-
KNN.fit_transform_pw(X, precomputed_knn=None, smooth=False, n_neighbors=100, n_jobs=1)¶ Returns an array of pointwise ID estimates by fitting the estimator in kNN of each point.
Parameters: - X : np.array (n_samples x n_neighbors)
Dataset to fit
- precomputed_knn : bool
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: - dimension_pw_ (np.array with dtype {int, float}) – Pointwise ID estimates
- dimension_pw_smooth_ (np.array with dtype float) – Smoothed pointwise ID estimates returned if self.fit_pw(smooth=True)