Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about the get point statistics function in measurement #18

Closed
RobinloveCode opened this issue Mar 9, 2019 · 4 comments
Closed
Assignees

Comments

@RobinloveCode
Copy link

No description provided.

@RobinloveCode
Copy link
Author

Hi Dr.

I am confused about how you calculate the accuracy measurement. Let us take uni variate and one-order for example.

In the Measurement.py, this line of code is used to calculate the RMSE of the targets and forecasts
ret.append(np.round(rmse(ndata[model.max_lag:], forecasts), 2)).

Here ndata[model.max_lag:] represents the targets , however the forecasts are generated by the following code, taking yu.model for example,
l = len(ndata) if not explain else 1
for k in np.arange(0, l):
actual = FuzzySet.get_maximum_membership_fuzzyset(ndata[k], self.sets, ordered_sets)
You take all the data to generate predictions. So the forecasts have the same length of input data, but shift forward by prediction horizon. However, the forecasts have the different length of ndata[model.max_lag:].

I am confused about this.

@petroniocandido
Copy link
Collaborator

Hi! Thanks to get in touch!

On benchmarks.Measures.rmse (https://github.com/PYFTS/pyFTS/blob/master/pyFTS/benchmarks/Measures.py#L32) assumes that the inputs are already synced up. For example, the function benchmarks.Measures.get_point_statistics (https://github.com/PYFTS/pyFTS/blob/master/pyFTS/benchmarks/Measures.py#L311) take the test data and a FTS model as inputs, then it generate the forecasts of the model and sync those data (it delete the first datapoint of the test data and the last datapoint of the forecasted data, when the order = 1, usually max_lag = 1).

It is clear for you now?

@RobinloveCode
Copy link
Author

RobinloveCode commented Mar 12, 2019 via email

@petroniocandido
Copy link
Collaborator

You are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants