docstr: 1. computes/estimates feature means
  2. if preprocess == 'zscore', computes/estimates feature standard devs
  3. if not classification, computes/estimates target mean/standard dev
  4. estimates largest singular value of data matrix
docstr_tok: ["1.","computes\/estimates","feature","means","2.","if","preprocess","==","'zscore","'",",","computes\/estimates","feature","standard","devs","3.","if","not","classification",",","computes\/estimates","target","mean\/standard","dev","4.","estimates","largest","singular","value","of","data","matrix"]
code: def compute_data_stats(self):
      """
      1. computes/estimates feature means
      2. if preprocess == 'zscore', computes/estimates feature standard devs
      3. if not classification, computes/estimates target mean/standard dev
      4. estimates largest singular value of data matrix
      """
      t = time.time()
      X, y = self.X[self.ix_statistics], self.y[self.ix_statistics]
      preprocess = self.preprocess
      classification = self.classification
  
      Xmn = (
          X.mean(dim=0)
          if not scipy.sparse.issparse(X)
          else np.array(X.mean(axis=0)).ravel()
      )
  
      if preprocess == constants.Preprocess.ZSCORE:
          Xsd = (
              X.std(dim=0)
              if not scipy.sparse.issparse(X)
              else PrepareData.sparse_std(X, Xmn)
          )
          Xsd[Xsd == 0] = 1.0
      else:
          Xsd = 1.0
  
      if preprocess is not None and preprocess:
          if preprocess == constants.Preprocess.ZSCORE:
              Xc = (X - Xmn) / Xsd
          else:
              Xc = X - Xmn
      else:
          Xc = X - Xmn
  
      sv1 = scipy.sparse.linalg.svds(
          Xc
          / (
              torch.sqrt(
                  torch.prod(
                      torch.as_tensor(
                          y.size(), dtype=torch.get_default_dtype()
                      )
                  )
              )
              if not scipy.sparse.issparse(X)
              else y.numpy().size
          ),
          k=1,
          which="LM",
          return_singular_vectors=False,
      )
      # avoid runaway sv1
      sv1 = np.array([min(np.finfo(np.float32).max, sv1[0])])
  
      if not classification:
          ymn = y.mean()
          ysd = y.std()
      else:
          # TODO: set these, for each class?
          ymn = 0.0
          ysd = 1.0
      if self.verbose:
          print(" computing data statistics took: ", time.time() - t)
  
      return Xmn, sv1, Xsd, ymn, ysd
  
imports: import os
  import pickle
  import sys
  import time
  import numpy
  import scipy.sparse
  from sklearn.datasets import load_svmlight_file
  import torch
  from torch.utils.data import DataLoader, Dataset
  from torch.utils.data.dataloader import _SingleProcessDataLoaderIter, _MultiProcessingDataLoaderIter, _utils
  from .None import constants
  from .None import syssettings
label_desc: Use image node_id 12 for calling the PrepareData obj's underlying member method code with example usage: obj.compute_data_stats() and returns: Xmn,  sv1,  Xsd,  ymn,  ysd