class_docstr: k-Nearest Neighbors imputation for arrays with missing data.
  Works only on dense arrays with at most a few thousand rows.
  
  Assumes that each feature has been centered and rescaled to have
  mean 0 and variance 1.
  
  Inspired by the implementation of kNNImpute from the R package
  imputation.
  See here:
  https://www.rdocumentation.org/packages/imputation/versions/2.0.3/topics/kNNImpute
docstr: Parameters
  ----------
  k : int
      Number of neighboring rows to use for imputation.
  
  orientation : str
      Which axis of the input matrix should be treated as a sample
      (default is "rows" but can also be "columns")
  
  use_argpartition : bool
     Use a more naive implementation of kNN imputation whichs calls
     numpy.argpartition for each row/column pair. May give NaN if fewer
     than k neighbors are available for a missing value.
  
  print_interval : int
  
  min_value : float
      Minimum possible imputed value
  
  max_value : float
      Maximum possible imputed value
  
  normalizer : object
      Any object (such as BiScaler) with fit() and transform() methods
  
  verbose : bool
docstr_tok: ["Parameters","--","--","--","--","--","k",":","int","Number","of","neighboring","rows","to","use","for","imputation",".","orientation",":","str","Which","axis","of","the","input","matrix","should","be","treated","as","a","sample","(","default","is","``","rows","''","but","can","also","be","``","columns","''",")","use_argpartition",":","bool","Use","a","more","naive","implementation","of","kNN","imputation","whichs","calls","numpy.argpartition","for","each","row\/column","pair",".","May","give","NaN","if","fewer","than","k","neighbors","are","available","for","a","missing","value",".","print_interval",":","int","min_value",":","float","Minimum","possible","imputed","value","max_value",":","float","Maximum","possible","imputed","value","normalizer",":","object","Any","object","(","such","as","BiScaler",")","with","fit","(",")","and","transform","(",")","methods","verbose",":","bool"]
code: def __init__(
      self,
      k=5,
      orientation="rows",
      use_argpartition=False,
      print_interval=100,
      min_value=None,
      max_value=None,
      normalizer=None,
      verbose=True,
  ):
      """
      Parameters
      ----------
      k : int
          Number of neighboring rows to use for imputation.
  
      orientation : str
          Which axis of the input matrix should be treated as a sample
          (default is "rows" but can also be "columns")
  
      use_argpartition : bool
         Use a more naive implementation of kNN imputation whichs calls
         numpy.argpartition for each row/column pair. May give NaN if fewer
         than k neighbors are available for a missing value.
  
      print_interval : int
  
      min_value : float
          Minimum possible imputed value
  
      max_value : float
          Maximum possible imputed value
  
      normalizer : object
          Any object (such as BiScaler) with fit() and transform() methods
  
      verbose : bool
      """
      Solver.__init__(
          self,
          min_value=min_value,
          max_value=max_value,
          normalizer=normalizer,
      )
      self.k = k
      self.verbose = verbose
      self.orientation = orientation
      self.print_interval = print_interval
      if use_argpartition:
          self._impute_fn = knn_impute_with_argpartition
      else:
          self._impute_fn = knn_impute_few_observed
  
imports: import numpy
  from knnimpute import knn_impute_few_observed, knn_impute_with_argpartition
  from sklearn.utils import check_array
  from .solver import Solver
label_desc: Use image node_id 1 to create a new KNN object from inherited base classes: Solver with example: obj = KNN(k, orientation, use_argpartition, print_interval, min_value, max_value, normalizer, verbose)