Kaggle competition: M5 Forecasting - Accuracy
<SOS> metric: M5_WRMSSE Kaggle data source: m5-forecasting-accuracy<train_model>
import numpy as np
import pandas as pd
learn.fit_one_cycle(7,slice(1e-2))<save_model>
data_Raw = pd.read_csv('.. /input/m5resaultdataset/ss.csv')
 data = data_Raw
data.head()
learn.save('stg-1' )<train_model>
data["F1"] = data["F1"] - data["F1"]*0.016
data["F2"] = data["F2"] + data["F2"]*0.017
data["F3"] = data["F3"] - data["F3"]*0.018
data["F4"] = data["F4"] + data["F4"]*0.019
data["F5"] = data["F5"] - data["F5"]*0.020
data["F6"] = data["F6"] + data["F6"]*0.021
data["F7"] = data["F7"] - data["F7"]*0.022
data["F8"] = data["F8"] + data["F8"]*0.023
data["F9"] = data["F9"] - data["F9"]*0.024
data["F10"] = data["F10"] + data["F10"]*0.025
learn.unfreeze()
learn.fit_one_cycle(6,max_lr=slice(1e-4,1e-3))<load_pretrained>
data.to_csv('ss-001.csv', index=False )
data = ImageDataBunch.from_folder(path,test='.. /test', ds_tfms=get_transforms() ,valid_pct=0.25,size=350,bs=32,num_workers=0)
 data.normalize(imagenet_stats )<compute_train_metric>
interp = ClassificationInterpretation.from_learner(learn)
 print(metrics.classification_report(interp.y_true.numpy() , interp.pred_class.numpy() ,target_names =data.classes))<save_model>
learn.save('stg-2' )<prepare_output>
learn.data=data<train_model>