Open stephenzwj opened 4 years ago
For the baseline model, classification model, we can consider the classification as the probability forecasting by fixing each power loss prediction on specific values and predict the probability of falling in each bin. That is, fixing values and predict the quantile of each value. The theoretical explanation is on the paper section 3.1
# # The syntax could be wrong as I seldom use pytorch
# y_pred = net(image,factor).squeeze().cpu()
# qg = torch.FloatTensor([0.125,0.250,0.375,0.500,0.625,0.750,0.875,1.00])
# e = (y_true-y_pred)
# temp=torch.cat((qg*e,(qg-1)*e))
# temp=torch.max(temp,dim=0)[0]
# loss+=torch.mean(temp)
Why is the y_pred in qr_loss and train_loss are constants? It should be a real power loss at that time.