text_plain_output_1.png
from torch.utils.data import DataLoader, TensorDataset, Subset

import gc

import pandas as pd

import torch

train = pd.read_parquet('../input/train-small/train_small.parquet')
float_feature_names = train.drop(['target', 'row_id', 'time_id', 'investment_id'], axis=1).columns
float_input = train[float_feature_names].values
investment_id = train[['investment_id']].values.astype(int)
time_id = train[['time_id']].values.astype(int)
targets = train[['target']].values
del train
float_input = torch.FloatTensor(float_input)
investment_id = torch.LongTensor(investment_id)
time_id = torch.LongTensor(time_id)
target = torch.FloatTensor(targets)
dataset = TensorDataset(time_id, investment_id, float_input, target)
gc.collect()