[docs]classPCA(DimRedMethod):""" Principal component analysis (PCA) method which wraps scikit-learn's PCA. Input arguments for the method are the same as supported by scikit-learn (see `PCA scikit-learn documentation <https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html#sklearn.decomposition.PCA>`_ for details), plus one additional immuneML argument: - components (list): which two components (1-indexed) to use for visualization in the :ref:`DimensionalityReduction` report. Default: [1, 2]. **YAML specification:** .. indent with spaces .. code-block:: yaml definitions: ml_methods: my_pca: PCA: n_components: 5 components: [3, 4] """def__init__(self,name:str=None,**kwargs):super().__init__(name)self.components=kwargs.pop('components',None)self.method_kwargs=kwargsself.method=SklearnPCA(**self.method_kwargs)self._validate_components(self.method.n_components)