-
Notifications
You must be signed in to change notification settings - Fork 128
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
add threshold_lo_ & threshold_hi_ #816
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -113,8 +113,8 @@ void Active::parse(const char** param, int num_param) | |||||||||
check_ = true; | ||||||||||
printf("Active learning.\n"); | ||||||||||
|
||||||||||
if (num_param != 5) { | ||||||||||
PRINT_INPUT_ERROR("active should have 4 parameters."); | ||||||||||
if (num_param != 6) { | ||||||||||
PRINT_INPUT_ERROR("active should have 5 parameters."); | ||||||||||
} | ||||||||||
if (!is_valid_int(param[1], &check_interval_)) { | ||||||||||
PRINT_INPUT_ERROR("check interval should be an integer."); | ||||||||||
|
@@ -141,13 +141,16 @@ void Active::parse(const char** param, int num_param) | |||||||||
} else { | ||||||||||
printf(" with force data.\n"); | ||||||||||
} | ||||||||||
if (!is_valid_real(param[4], &threshold_)) { | ||||||||||
if (!is_valid_real(param[4], &threshold_lo_)) { | ||||||||||
PRINT_INPUT_ERROR("threshold should be a real number.\n"); | ||||||||||
} | ||||||||||
if (!is_valid_real(param[5], &threshold_hi_)) { | ||||||||||
PRINT_INPUT_ERROR("threshold should be a real number.\n"); | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
} | ||||||||||
|
||||||||||
printf( | ||||||||||
" will check if uncertainties exceed %f every %d iterations.\n", | ||||||||||
threshold_, | ||||||||||
" will check if uncertainties exceed %f and %f every %d iterations.\n", | ||||||||||
threshold_lo_, threshold_hi_, | ||||||||||
Comment on lines
+152
to
+153
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
check_interval_); | ||||||||||
} | ||||||||||
|
||||||||||
|
@@ -238,7 +241,7 @@ void Active::process( | |||||||||
} | ||||||||||
} | ||||||||||
write_uncertainty(step, global_time, uncertainty); | ||||||||||
if (uncertainty > threshold_) { | ||||||||||
if (threshold_hi_ > uncertainty && uncertainty > threshold_lo_) { | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, it is correct. read it wrongly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
write_exyz( | ||||||||||
step, | ||||||||||
global_time, | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.