'Initialize preprocessing methods that pre-requires
calculation over entire dataset.'

def initialize(self, dataset, session, limit=None):

    if self.global_mean.is_required:
        if (self.global_mean.value is not None):
            self.global_mean.assign(self.global_mean.value, session)
        if (not self.global_mean.is_restored(session)):
            print('---------------------------------')
            print('Preprocessing...    Calculating    mean    over    all    dataset    (this    may    take    long)...')
            self._compute_global_mean(dataset, session, limit)
            print((('Mean:    ' + str(self.global_mean.value)) + "    (To    avoid    repetitive    computation,    add    it    to    argument    'mean'    of    `add_featurewise_zero_center`)"))
    if self.global_std.is_required:
        if (self.global_std.value is not None):
            self.global_std.assign(self.global_std.value, session)
        if (not self.global_std.is_restored(session)):
            print('---------------------------------')
            print('Preprocessing...    Calculating    std    over    all    dataset    (this    may    take    long)...')
            self._compute_global_std(dataset, session, limit)
            print((('STD:    ' + str(self.global_std.value)) + "    (To    avoid    repetitive    computation,    add    it    to    argument    'std'    of    `add_featurewise_stdnorm`)"))
    if self.global_pc.is_required:
        if (self.global_pc.value is not None):
            self.global_pc.assign(self.global_pc.value, session)
        if (not self.global_pc.is_restored(session)):
            print('---------------------------------')
            print('Preprocessing...    PCA    over    all    dataset    (this    may    take    long)...')
            self._compute_global_pc(dataset, session, limit)
            with open('PC.pkl', 'wb') as f:
                pickle.dump(self.global_pc.value, f)
            print("PC    saved    to    'PC.pkl'    (To    avoid    repetitive    computation,    load    this    pickle    file    and    assign    its    value    to    'pc'    argument    of    `add_zca_whitening`)")
