#NEWLINE# @ classmethod #NEWLINE# def init_from_components( cls , components , eigenvalues , mean , n_samples , centred , max_n_components = None ) : #NEWLINE# #INDENT# '\n        Build the Principal Component Analysis (PCA) using the provided\n        components (eigenvectors) and eigenvalues.\n\n        Parameters\n        ----------\n        components : ``(n_components, n_features)`` `ndarray`\n            The eigenvectors to be used.\n        eigenvalues : ``(n_components, )`` `ndarray`\n            The corresponding eigenvalues.\n        mean : ``(n_features, )`` `ndarray`\n            The mean vector.\n        n_samples : `int`\n            The number of samples used to generate the eigenvectors.\n        centred : `bool`, optional\n            When ``True`` we assume that the data were centered before\n            computing the eigenvectors.\n        max_n_components : `int`, optional\n            The maximum number of components to keep in the model. Any\n            components above and beyond this one are discarded.\n        ' #NEWLINE# model = PCAModel . __new__ ( centred ) #NEWLINE# model . n_samples = n_samples #NEWLINE# model . _constructor_helper ( eigenvalues = eigenvalues , eigenvectors = components , mean = mean , centred = centred , max_n_components = max_n_components ) #NEWLINE# return model