twitter / AnomalyDetection

Anomaly Detection with R
GNU General Public License v3.0
3.56k stars 779 forks source link

No more auto-print of results if "No anomalies detected." #35

Open hanowell opened 9 years ago

hanowell commented 9 years ago

Suppose I have a twelve-month-periodic vector vec, for which there are no anomalies. The following should not happen automatically, but currently it does.

anomaly_detection_obj <- AnomalyDetectionVec(vec, period = 12, threshold = "p95")
# [1] "No amomalies detected."

At the very least, whether to auto-print this message should be an argument in the function.

owenvallis commented 9 years ago

Good point. We can remove the print, and add a verbose mode for debugging.

erikriverson commented 9 years ago

@owenvallis Thank you! Also, you can use ?message to display messages from your functions when verbose is set, instead of ?print. Note that print actually returns a value, unlike message which is used for its side-effect of displaying a message to the user.

jhochenbaum commented 9 years ago

@erikriverson Ah thats good to know! We can definitely do that...

hanowell commented 9 years ago

+1 to using message rather than print

hanowell commented 9 years ago

BTW, any ETA on when this change will be made? Seems like a straightforward replacement of a call to print with a call to message

akejariwal commented 9 years ago

@BrashEQLibrium Please submit a patch. We shall review and merge.

cc @owenvallis @jhochenbaum

owenvallis commented 9 years ago

@BrashEQLibrium This was added a while back. The current version has all the prints replaced with the new message call.