-
Notifications
You must be signed in to change notification settings - Fork 54
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
Possible to have incorrect numbers with PW_REL? #16
Comments
As you know, there are two types of relative errors defined in SZ.
REL means the value_range based relative error. That is, absErrBound =
relBoundRatio *
(max-min) for each data point.
PW_REL means the point-wise relative error bound. Please note that
relBoundRatio
is used only for value_range based relative error mode.
For PW_REL, please set pw_relBoundRatio = 1E-4 and set segment_size = 25.
If you want to get strict bound effect for each data point, you need to use
pwr_type = MIN.
Best, Sheng
2017-09-07 16:59 GMT-05:00 Jong Choi <notifications@github.com>:
… I am trying to check if I am getting right values with PW_REL method.
Wi the following line in "sz.config" (other parts are same with the file
in example):
errorBoundMode = PW_REL
relBoundRatio = 1E-2
After running the following line followed by decompression, the pw
relative error I calculated is different from what I expected (I expect
lower than 1E-1):
$ ./testdouble_compress sz.config testdouble_8_8_128.dat 8 128
My calculation is 0.159883. I used some code something like:
for (i = 0; i < nbEle; i++)
{
rel = fabs(ori_data[i]-data[i])/fabs(ori_data[i]);
if (relMax < rel) relMax = rel;
}
printf ("Max pw_relative error = %g\n", relMax);
I am wondering if this is the right result or I did use incorrectly.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#16>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJW1Sece9QCMnmCDMC_33p6xkaKXm84wks5sgGdPgaJpZM4PQcfv>
.
|
I see. After using the above parameters, it works now. Thanks. |
I got another problem related with this. If I use SZ_Init_Params instead of SZ_Init(file), I have no compression with PW_REL. It works with REL or ABS. I used the following code for init:
|
Oops...The settings were not successfully set by SZ_Init_Params(&sz).
Bug is fixed. Thanks.
2017-09-08 20:26 GMT-05:00 Jong Choi <notifications@github.com>:
… I got another problem related with this. If I use SZ_Init_Params instead
of SZ_Init(file), I have no compression with PW_REL. It works with REL or
ABS.
I used the following code for init:
sz_params sz;
memset(&sz, 0, sizeof(sz_params));
sz.max_quant_intervals = 65536;
sz.quantization_intervals = 0;
sz.dataEndianType = LITTLE_ENDIAN_DATA;
sz.sysEndianType = LITTLE_ENDIAN_DATA;
sz.sol_ID = SZ;
sz.layers = 1;
sz.sampleDistance = 100;
sz.predThreshold = 0.99;
sz.offset = 0;
sz.szMode = SZ_BEST_COMPRESSION; //SZ_BEST_SPEED; //SZ_DEFAULT_COMPRESSION;
sz.gzipMode = 1;
sz.errorBoundMode = PW_REL; //REL; //PW_REL;
sz.absErrBound = 1E-4;
sz.relBoundRatio = 1E-3;
sz.psnr = 80.0;
sz.pw_relBoundRatio = 1E-2;
sz.segment_size = 32;
sz.pwr_type = SZ_PWR_MIN_TYPE;
SZ_Init_Params(&sz);
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#16 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJW1SY9ueynY4mHDQFvz4nGhnKcNVooAks5sgelNgaJpZM4PQcfv>
.
|
This was referenced Jul 21, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to check if I am getting right values with PW_REL method.
Wi the following line in "sz.config" (other parts are same with the file in example):
After running the following line followed by decompression, the pw relative error I calculated is different from what I expected (I expect lower than 1E-1):
My calculation is 0.159883. I used some code something like:
I am wondering if this is the right result or I did use incorrectly.
The text was updated successfully, but these errors were encountered: