docstr: Private function for partial_fit to enable trying floats before doubles.
docstr_tok: ["Private","function","for","partial_fit","to","enable","trying","floats","before","doubles","."]
code: def _partial_fit(self, X, y, n_classes=None, groups=None):
      """
      Private function for partial_fit to enable trying floats before doubles.
      """
      # pass in X and y in chunks
      if hasattr(self, "_data_train"):
          # just overwrite the X and y from the new chunk but make them tensors
          # keep dataset stats from previous
          self._data_train.X = (
              X.values if isinstance(X, pd.DataFrame) else X
          )
          (
              self._data_train.N,
              self._data_train.D,
          ) = self._data_train.X.shape
          self._data_train.dense_size_gb = (
              self._data_train.get_dense_size()
          )
          self._data_train.set_dense_X()
  
          self._data_train.y = (
              y.values if isinstance(y, pd.Series) else y
          )
          self._data_train.y = torch.as_tensor(
              y, dtype=torch.get_default_dtype()
          )
      else:
          data_train = self._prepare_data(X, y, n_classes=n_classes)
          self._data_train = data_train
  
      batch_size, _, accum_steps, max_iter = self._set_batch_size(
          self._data_train
      )
  
      rng = None  # not used
      debug = 0  # {0,1} print messages and do other stuff?
      dn_logs = None  # tensorboard logs; only specify if debug=1
      path_save = (
          None  # intermediate models saves; only specify if debug=1
      )
      m, solver = _train(
          self._data_train,
          batch_size,
          self.order,
          self.penalty,
          rng,
          self.learning_rate,
          debug,
          max_iter,
          self.max_time,
          self.init,
          self.dftol_stop,
          self.freltol_stop,
          dn_logs,
          accum_steps,
          path_save,
          self.shuffle,
          device=self.device,
          verbose=self.verbose,
          prev_checkpoint=self._prev_checkpoint
          if hasattr(self, "_prev_checkpoint")
          else None,
          groups=groups if not self.soft_grouping else None,
          soft_groups=groups if self.soft_grouping else None,
      )
  
      self._prev_checkpoint = m
      self._process_results(m, solver, X, groups=groups)
      return self
  
imports: import time
  import numpy
  import pandas
  from sklearn.base import BaseEstimator
  from sklearn.feature_selection import SelectorMixin
  from sklearn.utils.validation import check_is_fitted
  import torch
  from nni.feature_engineering.feature_selector import FeatureSelector
  from .None import constants
  from .fginitialize import PrepareData
  from .fgtrain import _train
label_desc: Use image node_id 3 for calling the FeatureGradientSelector obj's underlying member method code with example usage: obj._partial_fit(X, y, n_classes, groups) and returns: self