Skip to content

Commit bea2c2a

Browse files
committed
fix docs
Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net>
1 parent 45db515 commit bea2c2a

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/fknni/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
__version__ = version("fknni")
44

5-
from .knn import FastKNNImputer
5+
from .knn import FastKNNImputer, FaissImputer
66

77
__all__ = ["FastKNNImputer", "FaissImputer"]

src/fknni/knn/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .knn import FastKNNImputer
1+
from .knn import FastKNNImputer, FaissImputer

src/fknni/knn/knn.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ class FastKNNImputer(BaseEstimator, TransformerMixin):
8080
"""Imputer for completing missing values using Faiss or cuML, incorporating weighted averages based on distance.
8181
8282
Supports both numpy arrays (using FAISS) and cupy arrays (using cuML) for GPU-accelerated imputation.
83-
When cupy arrays are passed, all computations stay on GPU.
8483
"""
8584

8685
def __init__(
@@ -139,14 +138,12 @@ def __init__(
139138
def fit_transform( # noqa: D417
140139
self, X: np.ndarray | cp.ndarray, y: np.ndarray | None = None, **fit_params
141140
) -> np.ndarray[Any, dtype[Any]] | cp.ndarray:
142-
"""Imputes missing values in the data using the fitted Faiss/cuML index. This imputation will be performed in place.
141+
"""Imputes missing values in the data using the fitted Faiss/cuML index in place.
143142
144143
This imputation will use `min_data_ratio` to check if the index is of sufficient (dimension 0) size to perform a qualitative KNN lookup.
145144
If not, it will temporarily exclude enough features to reach this threshold and try again.
146145
If an index still can't be built, it will use fallbacks values as defined by self.strategy.
147146
148-
For cupy arrays, computation stays entirely on GPU using cuML's NearestNeighbors.
149-
150147
Args:
151148
X: Input data with potential missing values. Can be 2D (samples × features) or 3D (samples × features × timesteps).
152149
Accepts numpy arrays (uses FAISS) or cupy arrays (uses cuML).

0 commit comments

Comments
 (0)