Kaggle competition: ASHRAE - Great Energy Predictor III
<install_modules><EOS> 
import pandas as pd
import numpy as np
<SOS> metric: RMSLE Kaggle data source: ashrae-great-energy-predictor-iii<import_modules>
import pandas as pd
import numpy as np
from apex import amp
import os
import cv2
import glob
import pydicom
import numpy as np
import pandas as pd
import torch
import torch.optim as optim
from albumentations import Compose, ShiftScaleRotate, Resize
from albumentations.pytorch import ToTensor
from torch.utils.data import Dataset
from tqdm import tqdm_notebook as tqdm
from matplotlib import pyplot as plt<load_from_csv>
fold_1 = pd.read_csv('/kaggle/input/lgbt-on-leaks-fold-1/submission.csv')
 fold_2 = pd.read_csv('/kaggle/input/lgbt-on-leaks-fold-2/submission.csv')
 fold_3 = pd.read_csv('/kaggle/input/lgbt-on-leaks-fold-3/submission.csv')
 fold_4 = pd.read_csv('/kaggle/input/lgbt-on-leaks-fold-4/submission.csv')
 fold_5 = pd.read_csv('/kaggle/input/lgbt-on-leaks-fold-5/submission.csv' )
class IntracranialDataset(Dataset):
def __init__(self, csv_file, path, labels, transform=None):
self.path = path
self.data = pd.read_csv(csv_file)
 self.transform = transform
self.labels = labels
def __len__(self):
return len(self.data)
 def __getitem__(self, idx):
img_name = os.path.join(self.path, self.data.loc[idx, 'Image'] + '.png')
 img = cv2.imread(img_name)
 if self.transform:
augmented = self.transform(image=img)
 img = augmented['image']
if self.labels:
labels = torch.tensor(
 self.data.loc[idx, ['epidural', 'intraparenchymal', 'intraventricular', 'subarachnoid', 'subdural', 'any']])
 return {'image': img, 'labels': labels}
else:
return {'image': img} 
<load_from_csv>
fold_1['meter_reading'] =(fold_1['meter_reading'] + fold_2['meter_reading'] + fold_3['meter_reading'] + fold_4['meter_reading'] + fold_5['meter_reading'])/5
train = pd.read_csv(os.path.join(dir_csv, 'stage_1_train.csv'))
test = pd.read_csv(os.path.join(dir_csv, 'stage_1_sample_submission.csv'))<feature_engineering>
fold_1['meter_reading'] = np.expm1(fold_1['meter_reading'])
 fold_1.loc[fold_1['meter_reading'] < 0, 'meter_reading'] = 0
<save_to_csv><EOS> 
fold_1.to_csv('submission_fold_bland.csv',index=False )