def build_synthetic_train_or_val()

in tbsm_data_pytorch.py [0:0]


    def build_synthetic_train_or_val(self, out_file):

        np.random.seed(123)
        fea_sizes = np.fromstring(self.spa_fea_sizes, dtype=int, sep="-")
        maxval = np.min(fea_sizes)
        num_s = len(fea_sizes)
        X_cat = np.random.randint(maxval, size=(num_s, self.total, self.ts_length + 1),
        dtype="i4")  # 4 byte int
        X_int = np.random.uniform(0, 1, size=(1, self.total, self.ts_length + 1))
        y = np.random.randint(0, 2, self.total, dtype="i4")  # 4 byte int

        # saving to compressed numpy file
        if not path.exists(out_file):
            np.savez_compressed(
                out_file,
                X_cat=X_cat,
                X_int=X_int,
                y=y,
            )
        return