class_docstr: An unsupervised machine learning algorithm to reduce feature dimensionality.
  
  As a result, number of features within a dataset is reduced but the dataset still
  retain as much information as possible.
docstr: Set hyperparameters needed for training.
  
  Args:
      records (:class:`~RecordSet`): The records to train this ``Estimator`` on.
      mini_batch_size (int or None): The size of each mini-batch to use when
          training. If ``None``, a default value will be used.
      job_name (str): Name of the training job to be created. If not
          specified, one is generated, using the base name given to the
          constructor if applicable.
docstr_tok: ["Set","hyperparameters","needed","for","training",".","Args",":","records","(",":","class",":","`","~RecordSet","`",")",":","The","records","to","train","this","``","Estimator","``","on",".","mini_batch_size","(","int","or","None",")",":","The","size","of","each","mini-batch","to","use","when","training",".","If","``","None","``",",","a","default","value","will","be","used",".","job_name","(","str",")",":","Name","of","the","training","job","to","be","created",".","If","not","specified",",","one","is","generated",",","using","the","base","name","given","to","the","constructor","if","applicable","."]
code: def _prepare_for_training(
      self, records, mini_batch_size=None, job_name=None
  ):
      """Set hyperparameters needed for training.
  
      Args:
          records (:class:`~RecordSet`): The records to train this ``Estimator`` on.
          mini_batch_size (int or None): The size of each mini-batch to use when
              training. If ``None``, a default value will be used.
          job_name (str): Name of the training job to be created. If not
              specified, one is generated, using the base name given to the
              constructor if applicable.
      """
      num_records = None
      if isinstance(records, list):
          for record in records:
              if record.channel == "train":
                  num_records = record.num_records
                  break
          if num_records is None:
              raise ValueError("Must provide train channel.")
      else:
          num_records = records.num_records
  
      # mini_batch_size is a required parameter
      use_mini_batch_size = (
          mini_batch_size
          or self._get_default_mini_batch_size(num_records)
      )
  
      super(PCA, self)._prepare_for_training(
          records=records,
          mini_batch_size=use_mini_batch_size,
          job_name=job_name,
      )
  
imports: from __future__ import absolute_import
  from typing import Union, Optional
  from sagemaker import image_uris
  from sagemaker.amazon.amazon_estimator import AmazonAlgorithmEstimatorBase
  from sagemaker.amazon.common import RecordSerializer, RecordDeserializer
  from sagemaker.amazon.hyperparameter import Hyperparameter
  from sagemaker.amazon.validation import gt, isin
  from sagemaker.predictor import Predictor
  from sagemaker.model import Model
  from sagemaker.session import Session
  from sagemaker.utils import pop_out_unused_kwarg
  from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 3 for calling the PCA obj's underlying member method code with example usage: obj._prepare_for_training(records, mini_batch_size, job_name) without return types