You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I just read the code about the implementation of submodle responsibility calculation and have a question about the correctness of the following code in rqrmi_tools.cpp, line 422-452:
for (; vec; vec = (scalar_t*)vector_list_iterate(U_i)) {
// Get next transition pointscalar_t pt = vec[0];
// Get the bucket just before current point B(S(pt-epsilon))uint32_t bucket = vec[1];
// Add new responsibility interval to the submodel corresponds to the last// bucketscalar_t* new_interval = (scalar_t*)vector_list_push_back_and_get(
probe->responsibilities[stage_idx][bucket]);
// Check whether the current value is relevant to the bucket as wellscalar_t M = rqrmi_evaluate_model(model, pt);
uint32_t B = probe->stage_width[stage_idx] * (M < 0 ? 0
: M >= 1 ? 1 - SCALAR_EPS
: M);
// In case the input is not part of the bucketif (B != bucket) {
new_interval[0] = last_value;
new_interval[1] = SCALAR_PREV(pt);
last_value = pt;
}
// In case the input as a part of the bucketelse {
new_interval[0] = last_value;
new_interval[1] = pt;
last_value = SCALAR_NEXT(pt);
}
}
I think this code runs well when the function determined by the previous stage is continuous, which means the value of the variable "bucket" in the code is exactly the bucket index "B" calculated by the variable "last value". While, I wonder if the program still calculates the responsibility correctly when previous stage is in the following situation:
We can see the function is no longer continuous because of the existence of different submodels. And at this time when we iterate "variable" pt to $t_3$, "bucket" is 3, "last_value" is $t_2$ and the submodel 3 in current stage will get responsiblility $[t_2,t_3)$. But the true responsiblility for the submodel should be $[x_0,t_3)$. Are there some points I missed in the code that can handle the situation like this or simply this kind of situation doesn't exist at all?
I will appreciate it if you answer this question!
The text was updated successfully, but these errors were encountered:
Hi, I just read the code about the implementation of submodle responsibility calculation and have a question about the correctness of the following code in rqrmi_tools.cpp, line 422-452:
I think this code runs well when the function determined by the previous stage is continuous, which means the value of the variable "bucket" in the code is exactly the bucket index "B" calculated by the variable "last value". While, I wonder if the program still calculates the responsibility correctly when previous stage is in the following situation:
We can see the function is no longer continuous because of the existence of different submodels. And at this time when we iterate "variable" pt to
I will appreciate it if you answer this question!
The text was updated successfully, but these errors were encountered: