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

Results python vs opencl #6

Closed
Carolina710 opened this issue Oct 30, 2020 · 5 comments
Closed

Results python vs opencl #6

Carolina710 opened this issue Oct 30, 2020 · 5 comments

Comments

@Carolina710
Copy link

Good morning, it is possible to obtain different breaks and means values for the same data (and dates) inputs, when I run the algorithm in python and openCL?

The input data is a simple one with 124 series 17x17. In this case, I executed the algorithm in python, and next, I executed in openCL and obtained different values for breaks and means. I used in both cases the default values for k = 3, freq = 365, trend = False, hfrac = 0.25, level = 0.05 and I just changed the backend value. I must say that for some start_monitor dates the results for the breaks are equal (which is good), but not always. It is possible to obtain different breaks and means values when I change only the backend value, or I'm doing something wrong?

Thank you all, in advance!
Best regards

@mortvest
Copy link
Collaborator

Yes, it is currently possible. We are working on fixing the discrepancies between the two backends. Could you provide us the dataset that you used to get the error? A single time series would suffice. Thank you

@Carolina710
Copy link
Author

Hello Dmitry,

Thank you for your response.

I share data "subset_1": https://drive.google.com/drive/folders/1MkvA-MSvZCu_8WHkQ4p3R8Z0Qv_Vq-JC?usp=sharing
And data "Tile_1": https://drive.google.com/drive/folders/15DK5T9hZUaaIBNsfzR3tTp5pFb9XCWt5?usp=sharing

The data images are named with the dates, and you can simply collect in this way:

image

Those are the parameters that I used (I tried also freq=365). I didn't need to crop the data or dates since I used all the subset (124 Images). Nan_value = 0.

I'm obtaining results for the bfast main function not detailed. The one that just returns breaks and means.

Another thing that I would like to inform you about

For the "Tile_1" data, I did the same test above, and in this case, I detected 2 errors in the python version.

The first one is in file "base.py" here:

image

In line 200 I had to add that line of code, initializing the value for "first_break", because if you don't, and return, the algorithm assumes there is no value for the first_break parameter.

Second, which I don't have a solution:

After updating the first solution, an error occurs while processing row 120, in Python version. This error does not always happen, in this case, it happens when I use start_monitor = datetime(2018, 6, 18), for example.

image

But running in OpenCL I can obtain results.

Last questions:

I read this article https://arxiv.org/pdf/1807.01751.pdf

But I don't have entirely sure what are the values returned in the means array. Corresponds to the magnitude? My means values are always negative, and in python version is like Max:0 Min:-3.... and OpenCL Max:0 Min:-44....

If you prefer I can open other "issues" for all my other questions.

Obrigada/Best regards,
Carolina Oliveira

@mortvest
Copy link
Collaborator

Hello Carolina,

Thank you for the information.

  1. Could you please create a gist with the code that you have used?

  2. For the "first_break" issue, I am familiar with it and the solution would be added to the develop branch soon

  3. What did you mean by "first solution"? Could you also create a gist with the code?

  4. For the magnitude issue, there is a couple of problems and I am also working on this.

Could you split your question into multiple issues? That would make it easier for us to keep track of all problems.

Thanks,
Dmitry

@Carolina710
Copy link
Author

Hello,

1. Could you please create a gist with the code that you have used?

Here is the gist (more complete): https://gist.github.com/Carolina710/330b473478dd59188edaaa6a3fd76bb6

2. For the "first_break" issue, I am familiar with it and the solution would be added to the develop branch soon

Thank you!

3. What did you mean by "first solution"? Could you also create a gist with the code?

I mean after I add the line self.first_break = -1 I can run the algorithm in Python for Tile_1 and detect the 2nd error that I mention (in Fig 3).

4. For the magnitude issue, there is a couple of problems and I am also working on this.

Thank you!

I will split these issues later as soon as possible :)

@mortvest
Copy link
Collaborator

Should be fixed in develop

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

No branches or pull requests

2 participants