Machine Learning, Python, Towards Data Science, Dimensionality Reduction, Data Visualization.
def reduce(self, n_dimensions=None, keep_info=None): if keep_info: # Normalize singular values normalized_singular_values = self.singular_values / sum(self.singular_values) # Create the aggregated ladder of kept information per dimension ladder = np.cumsum(normalized_singular_values) # Get the