https://github.com/nixtla logo
#neural-forecast
Title
# neural-forecast
m

Marieke Wesselkamp

07/19/2023, 5:58 AM
Hello all 👋 I wish to use a loss function from neural-forecast outside of the package for a different task (fitting a non-linear function that forecasts a one dimensional ensemble distribution with sCRPS and MQLoss). However, in the documentation there is no information about the specific input and its shape required for the quantile losses: just that y and yhat need to be tensors. I expected the quantiles to be automatically computed from the yhat data distribution, but always run into dimension mismatch errors. Could maybe someone help out on this issue..? Thank you very much in advance!
👀 1
k

Kin Gtz. Olivares

07/19/2023, 3:21 PM
Hey @Marieke Wesselkamp, Sorry for the inconvenience, we need to update the loss modules to report the expected inputs. Here is the link to the definition: https://github.com/Nixtla/neuralforecast/blob/main/neuralforecast/losses/pytorch.py#L499 You may want to use .unsqueeze() or squeeze() to make the y and yq_hats match the needed dimensions.
m

Marieke Wesselkamp

07/19/2023, 3:41 PM
Thanks for the support, @Kin Gtz. Olivares, I'll figure the dimensions out then!