#NEWLINE# def reconstruct( self , inputs , add_mean = True ) : #NEWLINE# #INDENT# '\n        Given a PCA transformation of the current data, compute and return\n        the reconstruction of the original input\n\n        Parameters\n        ----------\n        inputs : WRITEME\n        add_mean : bool, optional\n            WRITEME\n\n        Returns\n        -------\n        WRITEME\n        ' #NEWLINE# self . _update_cutoff ( ) #NEWLINE# if self . whiten : #NEWLINE# #INDENT# inputs *= tensor . sqrt ( self . v [ : self . component_cutoff ] ) #NEWLINE# #UNINDENT# X = tensor . dot ( inputs , self . W [ : , : self . component_cutoff ] . T ) #NEWLINE# if add_mean : #NEWLINE# #INDENT# X = ( X + inputs . mean ) #NEWLINE# #UNINDENT# return X