I have time series data that i rescaled to values between -1,1 using the rescale function i.e.
scaled_data = rescale(data,-1,1);
I have use this data do a prediction and would now like to plot he prediction and confidence intervals in the orginal scale. Is there a way to do this? I tried
prediction_org_scale = rescale(prediction,min(data),max(data));
but realised that this is incorrect and am stuck with how to proceed.
Thanks for any help!

 채택된 답변

Guillaume
Guillaume 2019년 1월 11일

2 개 추천

You simply need to reverse the formula (which is given in the documentation of rescale. In your particular case:
prediction_org_scale = (prediction + 1) * (max(data) - min(data)) / 2 + min(data);
The generic formula:
unscale = @(data, l, u, inmin, inmax) (data - l) * (inmax - inmin) / (u - l) + inmin;

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Polar Plots에 대해 자세히 알아보기

질문:

2019년 1월 11일

댓글:

2019년 1월 11일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by